If you place a margin-top on the first box (red_box) it pulls or affects the containing box (container). Why?
.red_box {
background-color: red;
margin-top: 10px;
margin-right: 20px;
margin-bottom: 20px;`
margin-left: 40px;
height: 100px;
width: 300px
}
.green_box {
background-color: green;
margin-top: 40px;
margin-right: 20px;
margin-bottom: 20px;
margin-left: 40px;
height: 100px;
width: 300px
}
.container {
width: 500px;
height: 500px;
background-color: yellow;
}
<div class="container">
<div class="red_box">
red box
</div>
<div class="green_box">
green box
</div>
</div>