html - css nth child from element with class -
i there way of selecting (using css) nth child element class. example, following, how select li
element id="this"
(shown explanation purposes)? want 2nd element element class="selected"
<ul> <li></li> <li class="selected"></li> <li></li> <li id="this"></li> <li></li> <li></li> <li></li> </ul>
actually +
selector. bit dirty, works in case. need know exact position of element need.
.selected + li + li
(adding + li
times need)
Comments
Post a Comment