.zebraStripe tr {
background-color: expression(this.previousSibling?(this.previousSibling.style.backgroundColor=='#ffffff'?'#eeeeee':'#ffffff'):'#eeeeee');
}
Just add a class called "zebraStripe" to some first parent of the tr's you want to have zebra striped. It will fail graciously gracefully in browsers that don't support it.
ie:
<table class="mytable zebraStripe">
<tr>
<td>white</td>
</tr>
<tr>
<td>grey</td>
</tr>
</table>
Once the 2.0 browsers support nth-child, we can just incorporate that into this css style without having to touch the source.
Comments:
Created 130 weeks, 5 days ago