[thelist] CSS question: remove space under heading tags?

Simon Coggins ppxsjc1 at unix.ccc.nottingham.ac.uk
Fri Apr 27 08:09:45 CDT 2001


> > Is it possible to remove the space beneath an <Hx> tags using CSS? This goes
> > for all tags I guess... Is it possible to remove all the space/padding
> > around block elements?
> 
> It *should* be possible to remove the default margins from block level
> elements with margin: 0; and the padding with padding: 0;, but this won't
> work in Netscape 4, which adds any margins set to the default margins
> instead. This is a bug, and a very annoying one at that.

I should add that a possible workaround is to use <div> tags instead of
the required element such as <hx>, since the default margins on divs are
zero. Although this works, it spoils the structure of the page, so I
would recommend actually doing it unless you absolutely necessary.

Simon







More information about the thelist mailing list