As I work on creating lists that are displayed in columns of two, each .customer-review-container
includes a margin-bottom CSS property like this:
<div class="col-md-6">
<div class="customer-review-container">
</div> <!-- end customer-review-container -->
</div>
<div class="col-md-6">
<div class="customer-review-container">
</div> <!-- end customer-review-container -->
</div>
<div class="col-md-6">
<div class="customer-review-container">
</div> <!-- end customer-review-container -->
</div>
<div class="col-md-6">
<div class="customer-review-container">
</div> <!-- end customer-review-container -->
</div>
My goal is to create an nth-child selector to remove the margin-bottom
for the last row (3rd and 4th div elements), so I experimented with the following code:
div:nth-child(3n+1).customer-review-container{
margin-bottom: 0;
}
However, this code only removes the margin-bottom from the last div element (4th div).