Using CSS3 for alternate row colors
zymphonies
Fri, 04/19/2013 - 16:59
The DIV movement of getting away from table-based design taught us that tables should be used only when you're presenting a table of data on your website, yet no CSS selector/rule was created to allow us to shade alternate rows a different color.
tr:nth-child(odd) { background-color:#eee; } tr:nth-child(even) { background-color:#fff; }Tags CSS HTML