The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › CSS Selector nth-child within nth-child
I was wondering if i had a table, can i select every odd row and 2nd cell within it like this? #mainTable tbody tr:nth-child(odd) td:nth-child(2){ background-color: red; }
if not what is the solution?
Yes.
If you have any doubts, why not just try it?