[thelist] CSS spacing around block elements

MaKo shark at mako4css.com
Wed Mar 26 14:43:44 CST 2003

> Thanks, MaKo. I have tried that in the past and it seems to work only in
> some cases but not in others. At least in IE 6, for example, it seems to
> only reduce the spacing after head elements but not after p elements.

depends on the following blocklevel element.

If you have a <h3> followed by a <p> it might see so, because the
[vertical] margins between them collapse (to the value of the bigger
margin of those two).

Try something like

h3 {margin: 0;}
p {margin:0;}

<p>text text text</p>

-- :)

~~just when you thought it was safe to go back into the water~~

More information about the thelist mailing list