In HTML 5 with doctype , I have inside body:
<div style="width:100%; background-color: #cccccc;">
<div style="margin-top:20px; width:100px; background-color: #aa0000;">Sub</div>
Main
</div>
When I render in firefox, I getting outer div have margin 20px from top of page, what I need only sub div have margin 20px from the outer div. It works if I put character on top of sub div like:
<div style="width:100%; background-color: #cccccc;">
Main
<div style="margin-top:20px; width:100px; background-color: #aa0000;">Sub</div>
Main
</div>
e.g. http://jsfiddle.net/F3kXw/2/
It makes no sense to me, I never have had this problem in the past.