Consider the code snippet below:
<div class="section">
<div class="row">...</div>
<div class="row"> <!-- bottom margin here needs to be 0 -->
<div class="section">
<div class="row">...</div>
<div class="row">...</div>
</div>
</div>
</div>
.row {
margin-bottom:10px;
}
If the parent of a div with the class .row is a div with the class .section, the bottom margin should be reset to 0.
While this can be achieved using JQuery, is there a CSS-only solution for this?