Griff Miller wrote:
<snip<
Paul, thanks very much for your reply. The trouble is, I need to be able to
use absolute positioning.
I just wonder why. In fact, for your example, the default static
position is fine.
If you do want to use absolute positioning, why don't you make the two
boxes a single <div id="foo"> and then position #foo.
I found that I had to go to top: 5.4em to get a separation between
the boxes in IE. I think the difference for the behaviour in the two
browsers is because 1em does not correspond to an exact number of
pixels. So there could be a difference in the way each individual
browser resolves this.
I notice you've changed the order of the body attributes since this
morning. Since you're using css, I don't know why you're using body
attributes at all.
I think this will work:
<html><head>
<title>This is the title</title>
<style type="text/css">
div.whitebox {
border-style: solid;
border-width: 1em;
border-color: #000;
padding: 1em;
margin: auto 0 5px;width: 35em; height: 1em;
}
body { color: black; background: white; margin: 0; padding: 0}
#foo {position: absolute; left: 0.1em; top: 0.1em;}
</style></head>
<body alink="RED" link="BLUE" vlink="NAVY">
<div id="foo"><div class="whitebox">
This is the 1st box.
</div>
<div class="whitebox">
This is the 2nd box.
</div></div>
</body></html>