1
I’m trying to make a menu that opens when passing the mouse opens the corresponding submenu. In this case, the "blouses and shirts" menu should be with its submenu closed, opening only by hovering over it to show the short sleeve options and the others. however, when I open the screen in my browser, the submenu already appears right below as if it were there static, which makes me assume that the CSS is failing in this function
In css I have
.menu-departamentos li ul {
display: none;
}
.menu-departamentos li:hover ul {
display: block;
}
and in Html I have
<section class="menu-departamentos">
<h2>Departamentos</h2>
<nav>
<ul>
<li><a href="#">Blusas e Camisas</a></li>
<ul>
<li><a href="#">Manga curta</a></li>
<li><a href="#">Manga comprida</a></li>
<li><a href="#">Camisa social</a></li>
<li><a href="#">Camisa casual</a></li>
</ul>
<li><a href="#">Calças</a></li>
<li><a href="#">Acessórios</a></li>
</ul>
</nav>
</section>
Rafael his problem was actually in HTML and not in CSS, Snippet runs my answer that now it works right with Hover on the subintes etc.
– hugocsl
Thanks, it worked already
– Rafael Perracini