1
As I mentioned in my title, I wanted to make a bar. I don’t explain well what I want, but I’ll leave the link to a restaurant that has what I want to do: https://www.restaurantlarive.nl/nl/
Here is my code
Css:
.menu ul li{
background-color:#4d79ff; /* muda a cor da barra */
float: left; /* ficar horizontal */
width: 120px; /* tamanho da barra */
height: 50px; /* altura da barra */
display: inline-block;
text-align:center; /* ficar a esqueda*/
line-height: 22px; /* mover o submenu*/
font-size: 24px; /* tamanho da letra*/
position: relative;
}
.menu ul li:hover{
background-color:#33adff; /* muda a cor do submenu quando metes la o rato */
}
.menu ul{
padding: 0px; /* move a barra para a direita */
}
.menu ul ul{
display: none; /* para o sub sub menu ficar invisivel*/
}
.menu ul li:hover > ul{ /* para quando por o rato no menu ementa, aparecer o sub menu*/
display:block;
}
.menu ul ul ul{ /* SOBRE AS CARNES E PEIXES*/
margin-left:120px; /* mover para a direita*/
top: 0px; /* ir para baixo*/
position: absolute;
}
.menu ul ul li:hover{ /* SUBMENU DA EMENTA*/
background-color:#80bfff; /* cor do submenu*/
}
.menu ul ul ul li:hover{ /* SUBSUBMENU DA EMENTA*/
background-color:#80bfff; /* cor*/
}
.menu a{ /* OS MENUS*/
color:black; /* cor do texto*/
text-decoration: none; /* sem decoração*/
}
Html:
<img src="33.png" href="quinta.html" width="150" height="150">
<body>
<nav class="menu">
<ul>
<li><a href="Restaurante.html">Restaurante</a></li>
<li><a href="#">Ementa</a>
<ul>
<li><a href="Entrada.html">Entrada</a></li>
<li><a href="Prato Principal.html">Prato Principal</a>
<ul>
<li><a href="Carnes.html">Carnes</a></li>
<li><a href="Peixes.html">Peixes</a></li>
<li><a href="Vegetariano.html">Vegetariano</a></li>
</ul>
</li>
<li><a href="Sobremesas.html">Sobremesas</a></li>
</ul>
</li>
<li><a href="Reserva.html">Reserva</a></li>
<li><a href="Contacto.html">Contacto</a></li>
</ul><br><br><br><br>
</nav>
yes, it works thank you very much
– user100698
@Lucassintra glad it worked out! If my reply helped you in any way consider marking the Reply with "Accept" ✔
– hugocsl