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)
) - cannth-child(4n)
:
table tr:nth-child(4n+3) td, table tr:nth-child(4n+4) td { background: red; }
Comments
Post a Comment