Can anyone explain why the div is being pushed down? It seems like the top heading margin should push against the top of the div, not the browser window.
Wrapping another div around the div makes no difference.
But if I add padding-top:1px; to the div the problem goes away!
Try adding
overflow:autoto the parent element.CSS: Margin-top when parent's got no border
You can also use
overflow:hidden. Using theoverflowattribute on a parent element will also clear inner floats makingclear:bothnot necessary.