Forum Moderators: not2easy
<!DOCTYPE html>
<html>
<head>
<style>
tr:nth-child(odd) {
background-color:red;
}
</style>
</head>
<body>
<table>
<tbody>
<tr>
<td>1 - 1</td>
<td>1 - 2</td>
</tr>
<tr>
<td>2 - 1</td>
<td>2 - 2</td>
</tr>
<tr>
<td>3 - 1</td>
<td>3 - 2</td>
</tr>
<tr>
<td>4 - 1</td>
<td>4 - 2</td>
</tr>
</tbody>
</table>
</body>
</html>
tr {background-color:blue;}Keep the css neat to make it easy to scan/count the rows to identify where you are in the table, or if you want to avoid counting, just add two adjacent siblings to the previous selector.
tr:first-child + tr,
tr:first-child + tr + tr + tr,
tr:first-child + tr + tr + tr + tr + tr,
tr:first-child + tr + tr + tr + tr + tr + tr + tr {background-color:red}