Developindeenvelop
New Coder
Hello,
When making two drop down menu's, I fail to seperate them; now when I hover over one of them, the other menu also pops up. How can I get this so that when I hover over one menu, the other doesn't pop up? Thanks!
When making two drop down menu's, I fail to seperate them; now when I hover over one of them, the other menu also pops up. How can I get this so that when I hover over one menu, the other doesn't pop up? Thanks!
Code:
HTML:
</div>
<div class="dropdown">
<button>Nieuws</button>
<div class="dropdown-content">
<a href="Nieuws.html">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
CSS
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: rgba(0,0,0,0.7);
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: #ddd;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: #3e8e41;