It doesn't matter if last element is a <p>
or <h1>
etc. Why does the last elements margin fail to take an effect?
It should push the parents container background down.
.container {
background: grey;
}
h1 {
margin-bottom: 3em
}
p {
margin-bottom: 5em
}
<div class="container">
<h1>Title</h1>
<p>Content.</p>
</div>