[thelist] CSS: How to adjust line height in header tags?

Sam-I-Am sam at sam-i-am.com
Tue Jul 25 16:06:08 CDT 2000


netscape does recognise padding and margins, but it sets them as
relative to the heading block -- which includes the extra line below. So
if you want less than that default, AFAIK you have to use a negative
margin.

Then in IE everything looks screwed up.
So you have to use 2 stylesheets. 
One fairly painless way is code your css the netscape way, then top your
style sheet with 
@import url(corrected_margins.css);
and correct the margins in corrected_margins.css (which netscape will
ignore).

NB: This tests out ok in IE4+ and NN4*, but I've not tested it in any
other browsers.

hth
Sam

> padding.
> 
> You can have padding-top, padding-bottom, padding-left,
> padding-right.  This is from memory, read the spec at W3.org for more
> info.
> 
> It doesn't work right in Netscape.  Netscape will always put it's own
> padding underneath a header in addition to what you ask.
> 
> So if you want _less_ padding than the default, in Netscape, you
> can't use a header.  You would have to make a special class for the
> formatting & blow the structural markup.
> 
> Erika
> 
> >  > I am looking for a CSS way to adjust the line spacing
> >  > below the header or subheader using <H2>, <H3>,
> >  > etc tags.
> 
> erika at seastorm.com
> http://www.seastorm.com
> 
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list