A little dab'll do yaCode Snippets Code Snippets > CSS > CSS3 Zebra Striping a Table Submit one!CSS3 Zebra Striping a Tabletbody tr:nth-child(odd) { background-color: #ccc; }
great certainly saved me some time searching
this didn’t work well for me, but the PHP one worked great.
CSS3 zebra striping is better solution! Why? Here is the right concept:
1. PHP generates html as output, which should not care how the elements looks like.
2. CSS purpose is to “care” how the elements looks like.
Cant understand, how it works…
@Dyllon and @Artem, here is a simple demo explaining how to use this code, and a live example of it being used.
http://webdesignandsuch.com/2010/08/add-zebra-striping-to-a-table-with-css3/
Sadly… not supported by IE
Can be done with jQuery addClass.
shitty explorer not supported