Is there a way to use CSS to select the nth child from an element with a specific class? For instance, in the scenario below, how would I target the li
element with the id="this"
? Essentially, I am looking to pinpoint the 2nd element within the element that has a class="selected"
.
<ul>
<li></li>
<li class="selected"></li>
<li></li>
<li id="this"></li>
<li></li>
<li></li>
<li></li>
</ul>