I have this HTML structure:
<ul class="info">
<li>Item 1</li>
<li>Item 2</li>
</ul>
<ul class="info">
<li>Item 3</li>
<li>Item 4</li>
</ul>
<ul class="other">
<li>Item 5</li>
<li>Item 6</li>
</ul>
In CSS I want to select the last ul with class info. I've already tried :last-child
, :last-of-type
. I've also seen a suggestion to add a class on the ul I like to select. However, isn't there a more 'cleaner' way to handle this issue?