Please see this fiddle http://jsfiddle.net/a506r2gh/
There is a weird padding appearing between body and "header" division. And it goes away if I add a border to the "header" div. Margin collapse and body margin do not seem to be the problem here.
Thanks in advance!
Here is the html
<body>
<div class="header">
<a href="#"><div class="photo"></div></a>
<div class="footer"></div>
</div>
</body>
Here is the css
body {
margin:0; padding:0; background: #999;
}
.header {
background-color: #422;
/* border: solid 1px red; */ /* problem goes away if I add border to header */
}
.header .photo {
width: 150px;
height: 150px;
border-radius: 75px;
background: #660;
margin:50px auto;
}
.footer {
height:50px;
background: #303;
margin-bottom:50px;
}