I know the title of the question is kinda confusing, so I will try to explain better what I want to say.
Let's say that I have a group of elements, like a grid. - This grid can be uneven - This grid can have any number of columns
This is an example of a grid of 3 columns, with 7 elements.
As you see I am drawing a line below some of the elements.
What I would like is to apply these styles to all elements, except the ones on the last row. No matter how many items this may contain.
How can I achieve this?
The markup is really as simple as you can imagine:
<div class="items">
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
</div>
What I have right now is:
.item:nth-child(n + 4){
border-top: 1px solid black;
}