I'm struggling to create a menu where hovering over categories reveals another menu below it. I have created both the main menu and sub-menu, but I am unsure how to make the sub-menu appear on hover or apply any styling to it. I've tried various selectors like:
nav li.categories:hover .categories-ul
.categories:hover .categories-ul
.categories:hover nav .categories-ul
but nothing seems to work. What should I do?
.pc-nav-ul {
width: 50%;
display: flex;
justify-content: space-between;
border-bottom-left-radius: 2rem;
border-bottom-right-radius: 2rem;
backdrop-filter: hue-rotate(100deg) blur(5px);
}
.pc-nav-li {
font-size: 1.5rem;
font-family: var(--text-font);
padding: 1rem;
transition: 600ms;
}
.categories-ul {
backdrop-filter: hue-rotate(140deg) blur(20px);
padding: 0.7rem;
border-radius: 1rem;
width: 45rem;
display: flex;
justify-content: space-evenly;
position: fixed;
top: 5rem;
z-index: 99999;
transition: 600ms;
}
nav li.categories:hover .categories-ul {
background-color: red;
}
.categories-li {
font-family: var(--text-font);
font-size: 1.2rem;
}
.pc-nav-li:hover:not(.categories-li) {
letter-spacing: 2px;
}