Forum Moderators: not2easy

Message Too Old, No Replies

removing padding from headers

seems to work in firefox but not ie

         

HelenDev

3:01 pm on Aug 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have this code in my css...

h1, h2, h3, h4, h5, h6{font-family: Times New Roman, Times, serif; padding:0px; margin:0px;}

...this does what it says on the tin in Firefox, but in IE(6) I still seem to have the extra padding. My CSS has passed the validator.

How can I resolve this? Should I put a negative margin and serve this to IE only? I don't want to do anything which is liable to break something somewhere or store up future problems for myself.

Fotiman

3:22 pm on Aug 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's the line-height that you're seeing in IE. Try this:

h1, h2, h3, h4, h5, h6
{
font-family: Times New Roman, Times, serif;
line-height: 100%;
padding:0;
margin:0;
}

HelenDev

3:49 pm on Aug 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Aha!

Thanks Fotiman, that did the trick :)