I am facing a challenge with my multi-level menu, where the menu line consists of items separated by '|' and some items have dropdown lists. The issue is with the CSS pseudo-class last-child
capturing the wrong item, and I need it to target a specific menu line item (item3).
Here is the desired result.
<div class="menu">
<a href="">Item1</a>
<a href="">Item2</a>
<div class="dropdown">
<a class="dropbtn">Item3</a>
<div class="dropdown_content">
<a href="">Subitem1</a>
<a href="">Subitem2</a>
</div>
</div>
</div>
I am looking for a pure CSS solution that works on IE11 without any JavaScript. It's possible that adjusting the HTML structure of the menu itself could resolve this issue automatically.
Thank you in advance! :)