[thelist] [TIP] Solution: Zero body margin with CSS in NN4.x
Craig Saila
crsaila at yahoo.ca
Fri Mar 8 15:44:03 CST 2002
Fortune Elkins wrote:
> on an otherwise empty page in N 4.79 on NT 4 SP4, it doesn't work. i see
> whitespace guys where you suggest i shouldn't. why? am i doing something
> wrong? or is there a problem with this "received wisdom"??
You're seeing the whitespace NN4.x puts between most block elements (not
TABLES, ironically), which a different and extremely annoying bug.
To see what I mean, try putting a border around the DIV. You'll see the
border (and thus the DIV) *is* flush with the browser chrome:
BODY {margin: -10px 0 0 -10px;}
HTML BODY { margin: 0; padding: 0; }
#top {
position: absolute;
left:0;
top:0;
width: 100%;
background-color: green;
border: 1px solid black;
}
> <html>
> <head>
> <title>test</title>
> </head>
> <body>
> <div id="top"> <p>test</p> </div>
>
> </body>
> </html>
--
Cheers,
Craig Saila
------------------------------------------
craig at saila.com : http://www.saila.com/
------------------------------------------
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
More information about the thelist
mailing list