Forums

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

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #248592
    valkyriee
    Participant

    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?

    #248597
    Paulie_D
    Member

    Yes.

    If you have any doubts, why not just try it?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.