I am trying to create a drop-down menu in HTML/CSS, but I am not getting anywhere. I am trying to display the content div
ONLY when the Channel
button
is being hovered on. I tried looking at w3schools, but it didn't help.
.NavWrapper {
background: grey;
max-width: 5000px;
min-width: 500px;
height: 50px;
align: center;
padding: 10px;
}
.Home {
border: 0;
color: black;
background: white;
height: 50px;
width: 80px;
}
.Channel {
border: 0;
color: black;
background: white;
height: 50px;
width: 80px;
transition-duration: 0.3s;
position: relative;
}
.Content-Wrapper {
background: grey;
max-width: 5000px;
min-width: 500px;
height: 50px;
align: center;
padding: 10px;
display: none;
}
.Channel:hover, .Content-Wrapper {
background: silver;
color: black;
display: inline-block;
}
<div class = "NavWrapper">
<button class = "Home">
Home
</button>
<button class = "Channel">
Channel
</button>
<div class = "Content-Wrapper">
<button class = "Content-Button">
Hello World!
</button>
</div>
</div>