I am trying to select all elements in the rows of a certain class except the last row of that class. I have been trying to figure out the correct syntax to do so, but I just can't figure it out.
Here is the CSS I was thinking would do the job:
tr.ListRow:not(:last-of-type) td {
padding: 14px;
border-bottom-color: #768ca5;
border-bottom-width: 1px;
border-bottom-style: solid;
}
Here is the HTML so you can get an idea of what I am trying to do.
<tbody>
<tr class="Row ListRow">..........</tr> <!-- CSS applied to <td> tags within -->
<tr class="Graph">..........</tr>
<tr class="AltRow ListRow">........</tr> <!-- CSS applied to <td> tags within -->
<tr class="Graph">..........</tr>
<tr class="Row ListRow">..........</tr> <!-- CSS applied to <td> tags within -->
<tr class="Graph">..........</tr>
.
.
.
.
<tr class="AltRow ListRow">........</tr> <!-- CSS NOT applied to this last row of class ListRow -->
<tr class="Graph">..........</tr>
</tbody>
Edit: I ended up going a javascript route in which I answered below.