Rather than trying to explain this, I'll give you the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>weird</title>
<style type="text/css">
div#sidebar {
background-color: yellow;
float: left;
width: 200px;
}
</style>
</head>
<body>
<!-- insert something here to shift the top
of the sidebar by the top margin of the following div
-->
<div id="sidebar">
background-color: yellow;<br />
float: left; <br />
width: 200px;<br />
</div>
<div style="margin-top: 200px;">div - margin-top: 200px;</div>
</body>
</html>
I'm testing this in FF and Chrome. Strangely, IE6 behaves in a way that I thought was correct. (?) I've reduced this to the minimum reproduction I can. Basically, if you put any text near the comment, the sidebar will move to the top of the document like I expect it to be. Otherwise the sidebar seems to inherit the top margin of the following div.
What's going on?