I want to remove the margin around a #header. It should be the same slim margin as in the #content box. In the first place, I do not understand, why #header and #content have different margins.
Any pointers are appreciate
#box {
background-color: lightgreen;
}
#header {
background-color: grey;
float: right;
width: 150px;
text-align: center;
padding: 0;
margin: 0;
}
#content {
background-color: lightblue;
clear: both;
}
<div id="box">
<div id="header">
<p>Header</p>
</div>
<div id="content">Content</div>
</div>