...

View Full Version : CSS centering problem in Firefox



teiuq1
09-26-2006, 04:41 PM
I'm working on a horizontally fixed and vertically centered design using CSS at the moment. Here (http://www.soulband.org/yoga/home.html)'s what I've done so far.

As you can see I've placed all the site's content within a container which I am trying to center using body{text-align: center}. It works in IE but Firefox seems to be ignoring text-align and also my margin settings for some reason.

Also on my classes (http://www.soulband.org/yoga/classes.html) page, Firefox seems to be stretching the height of the table cells for some reason. I don't know why.

This is my first attempt at CSS so I'm sure I've just made a silly mistake somewhere. Anyhow, I'd appreciate it if anyone could help. Thanks!

_Aerospace_Eng_
09-26-2006, 04:48 PM
use margin:auto; on the #container instead of margin:0; IE incorrectly uses text-align:center; to center divs. margin:auto; is the correct way. As for your tables expanding paragraphs have default margins and padding, you need to 0 those out or just not use a paragraph at all. I say not use one at all as they seem to serve no purpose on that page.

Bill Posters
09-26-2006, 04:58 PM
http://www.soulband.org/yoga/logo.gif

Tut tutů

http://www.banksy.co.uk/indoors/images/flowerchucker.gif

I won't even ask what a masked rioter with flowers at his feet has to do with yoga.
Change it to something else, something original and more relevant - and not only will increase the chances of fulfilling the brief suitably, but you'll also reduce the chances of yourself and/or your client being sued for copyright infringement.

teiuq1
09-26-2006, 05:20 PM
Thanks, Arospace, that fixed it! I'd also like there to be no margin space above the top of the container. I've tried body{margin-top: 0px} but once again this works in IE but not in Firefox. Any ideas?

Bill, yeah I thought the logo was weird too, but he had it drawn and gave it to me. Not sure about the copyright issues because it's graffiti, but I'll mention it.

Bill Posters
09-26-2006, 05:30 PM
Whilst Banksy has done a number of variations of the rioter with flowers in graffiti/wall stencil in public spaces, the image to which I linked has been produced (by Banksy) as a print.

http://www.artofthestate.co.uk/Banksy/banksy_kate_and_chucker.htm

The fact that the print is based on graffiti/stencil style makes no difference to its status as a copyrightable image.

The logo produced for use in your project is undeniably a 'derivative artwork' of the print version, and given that it is highly unlikely to fall under 'fair use' exemptions, is, imho, almost certain to qualify as a breach of Banksy's copyright.

Your boss is a chancer (and the individual who drew it for him/her is little better).

_Aerospace_Eng_
09-27-2006, 03:00 AM
Thanks, Arospace, that fixed it! I'd also like there to be no margin space above the top of the container. I've tried body{margin-top: 0px} but once again this works in IE but not in Firefox. Any ideas?

And we are supposed to know what page you are talking about how?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum