Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS table alternate row doesn't paint in Explorer but works in Mozilla, Chrome and Opera

Tags:

css

When I put in css file lines

.properties_table tr:nth-child(even) {background: #CCC;}
.properties_table tr:nth-child(odd) {background: #FFF;}

in Mozilla, Opera and Chrome it looks fine but there it doesn't show in Explorer 8 ( I tested only on IE 8 ). Need to look like this enter image description here

but looks like this

enter image description here

Does anyone have suggestion ?

like image 613
Danka Avatar asked Dec 04 '25 22:12

Danka


1 Answers

nth-child is not supported by IE8: http://caniuse.com/#search=nth-child

Try defining odd and even classes instead and applying the given style to them in your css.

like image 189
Giann Avatar answered Dec 06 '25 11:12

Giann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!