0
Guys, I made a menu with dropdown that gives a little problem. As soon as it opens, it stretches the line instead of being in a "box". Someone can help me -> http://marciabelmiro.com.br/tg18/ link to the menu.
<html>
<head>
<style>
width: 100%;
height: 100%;
position: absolute;
.container {
display: inline-block;
cursor: pointer;
}
.bar1,
.bar2,
.bar3 {
width: 35px;
height: 5px;
background-color: #000;
margin: 6px 95px;
transition: 0.4s;
}
.texto{
margin: 0px 0px -45px 0px;
font-size: 27px;
font-family: "Raleway", Times, serif;
}
/* Rotate first bar */
.change .bar1 {
-webkit-transform: rotate(-45deg) translate(-9px, 6px);
transform: rotate(-45deg) translate(-9px, 6px);
}
/* Fade out the second bar */
.change .bar2 {
opacity: 0;
}
/* Rotate last bar */
.change .bar3 {
-webkit-transform: rotate(45deg) translate(-8px, -8px);
transform: rotate(45deg) translate(-8px, -8px);
}
.hide {
display: none;
}
a:link
{
text-decoration:none;
}
</style>
<body>
<h1>
<div class="texto">MENU</div>
<div class="container" onclick="myFunction(this)">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
<div id="myDropdown" class="dropdown-content hide">
<a href="#"><font size="5" color="#97a2a7">TREINAMENTO</font></a>
<br/>
<a href="#"><font size="5" color="#97a2a7">PÚBLICO ALVO</font></a>
<br/>
<a href="#"><font size="5" color="#97a2a7">OPORTUNIDADE</font></a>
<br/>
<a href="#"><font size="5" color="#97a2a7">ESTRUTURA</font></a>
<br/>
<a href="#"><font size="5" color="#97a2a7">PALESTRANTES</font></a>
<br/>
<a href="#"><font size="5" color="#97a2a7">DEPOIMENTOS</font></a>
<br/>
<a href="#"><font size="5" color="#97a2a7">GALERIA DE FOTOS</font></a>
<br/>
<a href="#"><font size="5" color="#97a2a7">LOCAL</font></a>
<br/>
<a href="#"><font size="5" color="#97a2a7">IDEALIZADORES</font></a>
<br/>
</div>
</div>
</h1>
<script>
function myFunction(x) {
x.classList.toggle("change");
document.getElementById('myDropdown').classList.toggle("hide");
}
</script>
</body>
</head>
</html>
Menu code: lInk donwload
How so "he stretches the line instead of being in a "box"" I didn’t understand and I couldn’t visualize what you meant by that...
– hugocsl
was upping the code here. What happens, as soon as I click on the menu it goes down the whole line, stretching it.
– Gabriel Ramalho Grotto
Young put the code right in the question, avoid external links! I still can’t understand what you mean by "Stretch the line"... What rss line...
– hugocsl
Friend I took a look at the site and did not see a problem with the menu , I did not understand what you wanted to happen with the menu
– Gabriel.H