My issue involves two divs each containing a table. When I apply the CSS class "table" to the first div, the second table in the div is impacted as well.
.tbl-generic th:nth-child(-n+2),td:nth-child(-n+2) {
background-color:red;
width:25px;
}
.tbl-generic th:nth-last-child(-n+3),td:nth-last-child(-n+3) {
background-color:red;
width:25px;
}
<div>
<table class="tbl-generic">
<tr>
<td style="width:55px;">TEST1</td>
<td style="width:55px;">TEST2</td>
<td>TEST3</td>
<td>TEST4</td>
<td>TEST5</td>
<td>TEST6</td>
<td>TEST7</td>
</tr>
</table>
</div>
<div>
<table>
<tr>
<td style="width:55px;">A</td>
<td style="width:55px;">B</td>
<td>C</td>
<td>D</td>
<td>E</td>
<td>F</td>
<td>G</td>
</tr>
</table>
</div>
Visit this link for more information.