1
Good morning guys, I could create a dropdown without it needing to be a daughter tag?
I’ll explain with code. We usually 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>
You could do this with ul(menu-dropdown) outside 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 didn’t work there, but it would have been?
Just with CSS or valley with jQuery?
– hugocsl
Only with CSS, with Jquery I think I’ve already created, but, as I’m trying to use as little JS as possible, I think it would be ideal only with CSS
– Lucas de Carvalho