target the last hr within repeating div
I have a section that has a repeating div coming from the database and
within there there is an hr to separate them, but I need to hide the last
one in the list.
So my html looks like this.
<div class="container">
<div class="reply">
<p>wonderful paragraph</p>
<hr>
</div>
<div class="reply">
<p>wonderful paragraph</p>
<hr>
</div>
<div class="reply">
<p>wonderful paragraph</p>
<hr>
</div>
</div>
I have tried targeting with last-child a few different ways, but I cant
seem to get it right.
.container:last-child .reply hr{
display:none;
}
.reply:last-child hr{
display:none;
}
.container .reply:last-child hr{
display:none;
}
Any help would be wonderful!
No comments:
Post a Comment