[thelist] CSS, H1 and Netscape

aardvark roselli at earthlink.net
Tue Dec 26 22:21:21 CST 2000


> From: "Joshua OIson" <joshua at alphashop.net>
[...] 
> Navigator handles line-height in a very odd manner in general, thus making
> it difficult to change the spacing around h1, et al.  If you do manually
> adjust line height, then text after images will only be spaced down that
> amount from the top of an image, even if the image is taller than the
> spacing.  You often, as a result, get overlap.  A common method for
> circumventing Navigator's deficiencies with H tags to not use then and
> assign similar classes to the table cells, or spans, or whatever.  Thus:
> 
> <span class="h1">My title</span><br />

instead of ditching the <h#> tags altogether, and thereby purging 
useful structural markup from your document, sometimes it's better 
to accept the differences in rendering and allow your design to flow 
with it, regardless of the browser...

that being said, the 'margin-bottom' CSS attribute can affect it... 
'line-height' affects leading, which really isn't what determines the 
spacing underneath <h#> tags... 'margin-bottom' is probably the 
most appropriate fix, even though it doesn't always work... in fact, 
the new evolt.org design makes use of the <h#> tags, including 
<h1>, and while it isn't exactly the way we'd like it in NN4.x, it 
looks great in IE4+, N6+, and Opera 5+... and frankly, that's good 
enough...

one of these days i have to write that article on why <span> and 
<div> are evil tags... even though they aren't on their own...





More information about the thelist mailing list