0

I'm using a sortable ng-table to display some data. Each column has a sorting header. (which is a <div> inside a <th class="sortable">)

If I try to select the first header using

th.sortable > div:nth-child(1)

It selects all the divs inside each <th>

I forked an existing fiddle and added a block at the top of the css pane.

http://fiddle.jshell.net/7mom2ar0/

1 Answer 1

1
th.sortable:nth-child(1) > div:nth-child(1) {
    background-color: red;
}

use it like this, if you want first selector for <th> can done like this also. : http://fiddle.jshell.net/bxhcu50a/

th.sortable:first-child > div:first-child {
    background-color: red;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.