A very basic css question ...

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

A very basic css question ...

Post 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.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: A very basic css question ...

Post 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
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.)
Judebert
---
Website | Wishlist | PayPal
Post Reply