0
.menuAbrir,
.menuFechar {
display:none;
}
.menuPrincipal li {
display:inline;
position: relative;
}
.menuPrincipal li a{
display:inline-block;
vertical-align:middle;
text-align:center;
width:115px;
line-height:70px;
font-size: 20px;
transition: background-color 1s;
}
.menuPrincipal li a:hover {
background-color: #63C4D3;
color: #FFFFFF;
}
.menuPrincipal li:hover > .sub-menu{
display:block;
}
.sub-menu {
display:none;
position:absolute;
}
.sub-menu li {
display:block;
}
<ul class="menuPrincipal">
<li><a id="mnHome" href="index.php">HOME</a></li>
<li><a id="mnPesquisa" href="#">LOJA</a>
<ul class="sub-menu">
<li>Teste</li>
</ul>
</li>
<li><a id="mnContato" href="../contato.php">CONTATO</a></li>
<li><a id="mnSobre" href="../sobre.php">SOBRE</a></li>
</ul>
The problem is that the submenu comes out below the first li
and not under your li
correspondent.
What to do?
test here and the sub-menu appeared below the "Shop" normally.
– RFL
It seems to me normal too and your js
abrefecha()
is missing from the code– andrepaulo
Yes, I missed a line I forgot to put. Look now doing please!
– Carlos Rocha