Page 1 of 1

A very basic css question ...

Posted: Wed Nov 29, 2006 11:16 am
by lordcoffee
Hi!

I have a very basic css-question here. I'm working on some themes and won't be able to get them finished. The main problem is that FF and IE are doing not the same (as everybody knows). Heres an example of my prob:

Image

As you can see the IE puts 2px in height and width between the header and the content. It looks very ugly with this! Heres the online version:

http://www.taeglichanders.de/blog

Thanks for any help,
Lordcoffee.

Re: A very basic css question ...

Posted: Wed Nov 29, 2006 12:19 pm
by yellowled
lordcoffee wrote:As you can see the IE puts 2px in height and width between the header and the content. It looks very ugly with this!
I'm not really good with fixes for IE, but does it help setting padding: 0; for the body? Might also be a case of the IE Three Pixel Gap.

YL

Posted: Wed Nov 29, 2006 7:46 pm
by judebert
In fact, if you use padding or margin, remember that IE will *subtract* that from the width of the box. FF and other browsers will, in accordance with the CSS spec, *add* the margin and padding to the box width.

If that's the problem, you need to manually add the padding and margin to the box's width... for IE only. You can use one of the hacks for that. (Just Google up "IE CSS hacks" to see what I'm talking about. I like !important, myself.)