I'm trying to make a dropdown menu with html and css. I followed a ton of tutorials but they don't seem to work for me and I can not figure out why. I have an for a menubar that's always showing on the top of the screen and I want another to show when you hover the burgermenu on the left. This is my current code:
<body>
<div class='menudiv'>
<ul>
<li><a><img class='dropdown' src='burgermenu.png' alt='OpenMenu' height='90px' width="90px" onmouseover="this.src='burgermenuwit.png'" onmouseout="this.src='burgermenu.png'"></a></li>
<li style="float:right"><a href="#login"><img src='pp.png' alt='LogIn' height='90px' width="95px" onmouseover="this.src='ppwit.png'" onmouseout="this.src='pp.png'"></a></li>
</ul>
</div>
<div class='logo'>
<a href="#home"><img src='flowy_logo.png' alt='Logo' height='95px', widht='95px' onmouseover="this.src='flowy_logowit.png'" onmouseout="this.src='flowy_logo.png'">
</div>
<div class='menu2'>
<ul>
<li><a>Meten</a></li>
<li><a>Huidige waardes</a></li>
<li><a>Geschiedenis</a></li>
<li><a>Contact</a></li>
</ul>
</div>
</body>
</html>
and css:
.menudiv ul {
font-family: "Georgia", "Times New Roman", "Serif";
font-size: 25px;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: rgb(102, 75, 255);
}
.menudiv ul li {
float: left;
cursor: pointer;
}
.menudiv ul li a {
display: block;
padding: 8px;
}
.logo img {
position: relative;
top: -105px;
margin-left: auto;
margin-right: auto;
display: block;
}
.menu2 ul {
position: relative;
list-style-type: none;
margin: 0;
padding: 0;
font-size: 30px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
top: -100px;
}
.menu2 ul li a {
display: block;
width: 200px;
background-color: rgb(102, 75, 255);
padding-top: 10px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
}
.menu2 ul li a:hover {
color: white;
cursor: pointer;
}
.menu2 {
display: none;
}
.dropdown:hover .menu2 {
display: block;
}
Can anybody tell me why it's not working?