I use php for my web project, but I need this coloring complement with CSS alone.
Thus I need code that works in Firefox and internet explorer.
This code is written, but does not work in internet explorer:
.tbl_css col:nth-child(odd){
}
.tbl_css col:nth-child(even){
}
Lower versions of IE will not support pseudo-selection.
You can use jQuery to make it work:
$(document).ready(function(){
$('table tr:even').addClass('even');
$('table tr:odd').addClass('odd');
});
In CSS simply:
.even{ /* your styles */ }
.odd { /* your styles */ }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With