I have a table as below. I need to apply alternate colours starting from 2nd row. When I'm using nth-child selector to differentiate odd and even rows, the 1st row is being considered which isn't fulfilling the requirement.
So, how can we write a selector that ignores 1st row and starts applying colours from 2nd row considering 2nd row as odd row?
I know we can apply colour of odd row to even row and vice versa as a work around but some what it is confusing when we look at the code. So, I'm looking for an alternate solution for this table structure below. I appreciate your help. Thanks.
<table>
<tbody>
<tr>
<th>col 1</th>
<th>col 2</th>
</tr>
<tr>
<td>11</td>
<td>12</td>
</tr>
<tr>
<td>21</td>
<td>22</td>
</tr>
<tr>
<td>31</td>
<td>32</td>
</tr>
</tbody>
</table>