select every second row in html table

60

select every second row in html table -

tr:nth-child(even) {
   // if it's even - rows 2,4,6 etc - apply styles
}

tr:nth-child(odd) {
   // if it's odd - rows 1,3,5 etc - apply styles
}

Comments

Submit
0 Comments