How can I target the innermost use of a css class?
In this list, how do I select the deepest instance of the class .active
, which in this case is the <li>
element wrapping
<span>Item 1.1.1.1</span>
?
<ul>
<li class="active">
<span>Item 1</span>
<ul>
<li class="active">
<span>Item 1.1</span>
<ul>
<li>
<span>Item 1.1.1</span>
<ul>
<li class="active"> // need selector for this <li>
<span>Item 1.1.1.1</span>
<ul>
<li>
<span>Item 1.1.1.1.1</span>
</li>
<li>
<span>Item 1.1.1.1.2</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<span>Item 1.2</span>
<ul>
<li>
<span>Item 1.2.1</span>
<ul>
<li>
<span>Item 1.2.1.1</span>
<ul>
<li>
<span>Item 1.2.1.1.1</span>
</li>
<li>
<span>Item 1.2.1.1.2</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<ul>