Good morning guys, how could I create a dropdown without it having to be a daughter tag?
I'll explain with code. Usually we do this:
.menu-dropdown {display: none;list-style: none;}
.menu:hover .menu-dropdown {display: block;}
<ul class="menu">
<li>
<a href="#">Teste</a>
<ul class="menu-dropdown">
<li><a href="#">Abriu</a></li>
</ul>
</li>
</ul>
Would you like to do this with ul (menu-dropdown) outside the ul (menu)?
For example:
.menu-dropdown {display: none;list-style: none;}
.menu:hover .menu-dropdown {display: block;}
<ul class="menu">
<li>
<a href="#">Teste</a>
</li>
</ul>
<ul class="menu-dropdown">
<li><a href="#">Abriu</a></li>
</ul>
As you can see, it did not work there, but could you do it?