How to give two different bgcolor for alternative rows in a table dynamically using CSS.
I don't want to use jQuery for solving this problem.
Use :nth-child() pseudo class
tr:nth-child(odd){
background-color:green
}
tr:nth-child(even){
background-color:yellow
}
Here is few more selector example.