Answer the question
In order to leave comments, you need to log in
How can I set a bottom border for each element except the last one?
There is a block with elements in it, you need to add a bottom border for each element except the last one, how can I do this?
I can't edit html code
<div class='right_part'>
<div class='right_part_item'>
<div class='right_part_item_date'> 07-12-2014 </div>
<a class='right_part_item_link' href="some_link">Lorem ipsum .... </a>
</div>
<div class='right_part_item'>
<div class='right_part_item_date'> 12-11-2016 </div>
<a class='right_part_item_link' href="some_link">Lorem ipsum .... </a>
</div>
<div class='right_part_item'>
<div class='right_part_item_date'> 11-02-2018 </div>
<a class='right_part_item_link' href="some_link">Lorem ipsum .... </a>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
.right_part .right_part_item {
border-bottom: 1px solid red;
}
.right_part .right_part_item:last-child {
border-bottom: 0px;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question