Hey there, I'm having an issue with my drop-down menu. When I hover over it, nothing happens. Can anyone please help me figure out what's wrong? I tried changing the visibility from hidden to display none/block when hovering, but it doesn't seem to make a difference.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Merriweather", serif;
}
nav {
width: 100%;
height: 80px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
}
.logo {
font-size: 30px;
}
.navitems {
display: flex;
list-style: none;
gap: 50px;
font-size: 20px;
text-transform: uppercase;
}
.drophover {
position: relative;
}
.dropmenu {
position: absolute;
top: 80px;
list-style: none;
line-height: 60px;
text-align: left;
box-shadow: rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;
padding: 10px;
opacity: 0;
transition: opacity 200ms ease-in-out;
}
.drophover:hover .dropmenu {
opacity: 1;
}
<header>
<nav>
<h1 class="logo">Morroco.</h1>
<ul class="navitems">
<li class="drophover">Découvrir le Maroc</li>
<ul class="dropmenu">
<li>Histoire & Géographie</li>
<li>Art & Culture</li>
<li>Téchnologie</li>
</ul>
<li>Destinations</li>
<li>Infos Pratique</li>
<li>Nous Contacter</li>
</ul>
<i><img src="/img/menu_FILL0_wght400_GRAD0_opsz48.svg" alt="" /></i>
</nav>
</header>
I've attempted adjusting the opacity and visibility using display none and display block on hover, but unfortunately, there is no change.