How to determine even / odd rows of a table via css
? So that the line styles alternate.
3 answers
Read about the pseudo-classes , everything is extremely simple. In your case, these are pseudo-classes : odd and : even
|
If cross-browser compatibility is needed, then keep in mind that: odd and: even refers to CSS3 and is not supported in IE below 9. In general, you can read about it here. But you can use selectivizr in conjunction with jQuery or another known framework.
|
Here is a good article on this topic: "Striped tables" by means of CSS .
|