Manage margins so that the last element(s) have no margin(s)
<p>I work with boxes and I want to always give the last element a &quot;margin-bottom: 0&quot;. So first I give every element a &quot;margin-bottom: 1em;&quot;. I now want to delete this margin bottom from the last element in my boxes but if there is an element within it doesn't work and I still have a margin at the bottom. any idea how to do this? It could be a paragraph or a DIV or SPAN or whatever, so I do not always want to do this by hand. I want to make a mixin wth this.</p>
<p>I tried:</p>
<pre><code>section *+:last-child {
   margin-bottom: 0;
   border: 3px solid blue;
}
</code></pre>
<p>But in the last div there is a paragraph with margin so it doesn't work.</p>