I wonder why .content-b
's margin-bottom wont stretch the .container
?
.container {
background: grey;
}
.content-a,
.content-b {
height: 100px;
border: 1px solid red;
margin-bottom: 100px;
}
<div class="container">
<div class="content-a"></div>
<div class="content-b"></div>
</div>
If you inspect .content-b
you can see that the browser renders the margin, and would push down the elements below it if there were any, but shouldn't it stretch the container itself?