Experimenting with a nested drop-down menu using basic CSS. I am creating a navigation menu. Everything seems to be working fine, except for the issue that arises when hovering over the ABOUT US section under NEW HERE. It displays the correct result, but the problem is that it does not disappear when hovering over the next section below it. How can I fix this? Here's The Link For the snippet for you to review. Please let me know where I might be going wrong. here's the code for your reference..
.dropbtn2
{
position: relative;
display: none;
}
.dropdown {
position: relative;
display: inline-block;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 169px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
color: black;
font-size:20px;
padding: 12px 16px;
text-decoration: none;
display: block;
}
/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color: #f1f1f1}
/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
display: block;
transition:none;
}
.dropdown-content a:hover {
padding-top:15px;
transition:ease-in-out .5s;
}
.dropdown:hover .dropbtn
{
background-color: #8300ff;
color: #182318;
padding-top: 500px;
padding-bottom: 30px;
padding-right: 20px;
padding-left: 20px;
transition: ease-out 0.5s;
text-decoration: none;
box-shadow:none;
}
/* End*/
.dropdown-content2 {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width:170px;
left:170px;
top:0;
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content2 a {
color: black;
font-size:20px;
padding: 12px 16px;
text-decoration: none;
display: block;
}
/* Change color of dropdown links on hover */
.dropdown-content2 a:hover {background-color: #f1f1f1}
/* Show the dropdown menu on hover */
.dropdown-content:hover .dropdown-content2 {
display: block;
transition:none;
}
.dropdown-content2 a:hover {
padding-top:15px;
transition:ease-in-out .5s;
}
.dropdown a:hover .dropbtn2
{
padding-bottom: 30px;
padding-right: 20px;
padding-left: 20px;
transition: ease-out 0.5s;
text-decoration: none;
box-shadow:none;
}
/*TEST*/