NS 6, top margin, and float

by "Lois Wakeman" <lois(at)lois.co.uk>

 Date:  Wed, 15 May 2002 11:25:28 +0100
 To:  "hwg styles" <hwg-style-digest(at)mail.hwg.org>
  todo: View Thread, Original
Dear List,

With these styles (yes, they are bloated, but necessary to work in NS4
etc.):

body {
 color : #000000;
 background-color : #FFFFFF;
 font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
 margin: 0px;
 background-image : url(images/blue.gif);
 background-position : top left;
 background-repeat : no-repeat;
}

#right {
 float : right;
 text-align : left;
 width : 150px;
 padding : 0.25em;
 color : #000000;
 font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
 font-size : 80%;
 background-color : #99CCFF;
}

#main {
 color : #000000;
 font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
 margin-top : 2em;
 margin-left : 1em;
 margin-right : 1em;
}

I am having trouble, unusually,  in getting NS6.2 to obey the top margin in
this code (it's using a minimal amount, I'd guess about 0.2 em):

<.?xml version="1.0"?>
<.!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<.html xmlns="http://www.w3.org/1999/xhtml">
<.head>
<.title>rhubarb</title>
<.link rel="STYLESHEET" type="text/css" href="en.css" />
</head>
<.body>
<.div id="right">menu and logo</div>
<.div id="main"><.h1>Introduction</h1>
<.p>waffle waffle waffle </p>
.........
</div>
</body>
</html>

Anyone have any ideas how to fudge this? It is something to do with the
floated DIV, since if I remove this, the proper top margin is used. (I could
move the floated DIV inside the other one, but I want it to be top right,
not take on the extra margins).

Lois Wakeman

------------------------------------------------------
http://lois.co.uk
http://siteusability.com
------------------------------------------------------

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA