The problem is the float. It is not needed if you want the red section on top. If the red section is your header, then in your html let it come first and specify the margin only once like this,.headerwrap{ width:100%; height:50px; margin:0px auto; background-color:red;}