Forum Moderators: not2easy
<style type="text/css">
tr
{
BACKGROUND-COLOR: purple;
COLOR: yellow;
}
tr.alt
{
BACKGROUND-COLOR: yellow;
COLOR: purple;
}
</style><script type="text/javascript">
function ColorAltRows() {
tblRows = document.getElementsByTagName("tr");
for (i = 1; i < tblRows.length; i = i + 2) {
tblRows[i].className = "alt";
}
}
</script><body onload="ColorAltRows();">
<table>
<tr>
<td>An ODD Row</td>
</tr>
<tr>
<td>An EVEN Row</td>
</tr>
<tr>
<td>An ODD Row</td>
</tr>
<tr>
<td>An EVEN Row</td>
</tr>
<tr>
<td>An ODD Row</td>
</tr>
<tr>
<td>An EVEN Row</td>
</tr>
<tr>
<td>An ODD Row</td>
</tr>
<tr>
<td>An EVEN Row</td>
</tr>
</table>
</body>
This will apply the tr style to all rows and then apply the tr.alt style to all the "even" rows (2, 4, etc.).
Hope this helps...