Well, I made a menu with dropdown that gives a little problem. As soon as he opens, he stretches the line rather than being in a box. Can anyone help me - > link link where the menu is located.
<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: l ink donwload