Is it possible to use CSS pseudo-classes to select even and odd instances of list items?
I\'d expect the following to produce a list of alternating colors, but inste
The problem with your CSS lies with the syntax of your pseudo-classes.
The even and odd pseudo-classes should be:
li:nth-child(even) { color:green; }
and
li:nth-child(odd) { color:red; }
Demo: http://jsfiddle.net/q76qS/5/