Usually when parent's margin collapsing overflow:hidden helps but in this situation it doesn't work. Other fixes are working ok padding:0.01px,position absolute
. Can you explain why overflow doesn't work here please?
html {
background: #e3b5a4;
height: 100%;
}
body {
background: #d1cfcd;
width: 960px;
height: 100%;
margin: 0px auto;
overflow: hidden;
}
div {
text-align: center;
background: #eee;
border: 1px solid;
padding: 10px;
margin: 10px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>layout</title>
</head>
<body>
<div class="header">Header</div>
<div class="navigation">Navigation</div>
<div class="leftcontent">Content Left</div>
<div class="main-content">Main Content</div>
<div class="right-content">Content Right</div>
<div class="footer">Footer</div>
</body>
</html>