I have a complex list structure:
<ul>
<li>Item</li>
<li>Item</li>
<li>Item</li>
<li>
<ul>
<li>Nested Item</li>
<li>Nested Item</li>
<li>Last Nested Item</li>
</ul>
</li>
<li>Item</li>
<li>Item</li>
<li>Last Item</li>
</ul>
I am trying to target the very last LI element with CSS3 selectors in order to style it differently, but I am having trouble isolating just that specific element without affecting others. The objective is simply to add rounded borders on hover to prevent overflow within a container.
My attempted selector
.container ul:first-of-type li:last-child a
doesn't seem to be working as expected. Even though I believe it should select the link within the last LI of the first UL, browsers like Firefox, IE, and Chrome are not interpreting it correctly.
If anyone can provide insight into where I might be making an error, I would greatly appreciate it.