css3 - Style table to highligh every other 2 rows -


i've been reading css3's nth-child, can't figure out how can style table rows 3,4 | 7,8 | 11,12 | 15,16 etc. yellow. every other 2 rows styled.

thanks

combine following:

  • every 4th row starting 3rd one, nth-child(4n+3)
  • every 4th row starting 4th one (nth-child(4n+4)) - can nth-child(4n):
table tr:nth-child(4n+3) td, table tr:nth-child(4n+4) td {     background: red; } 

demo


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -