I use this CSS code to display a database output in rows where the colors repeat in every 2nd row
tbody tr:nth-child(2n) td, tbody tr.even td {
backgro
IE8 does not support the :nth-child
CSS property. You can make it work in IE8 with this script:
https://github.com/roylory/ie7-js
How to use it:
You can Include it via conditional comments, e.g.:
The script will only load in IE9 and below, other browsers do not see it.
Live demo: https://jsbin.com/koyahe/edit?html,css,output
(This demo should work in all versions of IE.)