As a newcomer to Web Development, I am facing a fundamental issue with my bootstrap navigation bar. The navigation bar contains multiple dropdown buttons that activate on hover. One of the buttons within a dropdown needs another dropdown to appear when hovering over 'Perioadele'. My lack of familiarity with HTML is making it challenging for me to implement this feature.
.dropbtn {
background-color: #337ab7;
color: black;
padding: 16px;
font-size: 16px;
border: none;
margin-top: 3px;
margin-left: 20px;
border-radius: 5px;
font-family: Bitter;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
opacity: 0;
pointer-events: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
border-radius: 5px;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
height: 150px;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: #ddd;
border-radius: 5px;
}
.dropdown:hover .dropdown-content {
opacity: 1;
height: 240px;
pointer-events: all;
}
.dropdown:hover .dropbtn {
background-color: lightyellow;
}
<nav class="navbar navbar-dark bg-primary" id="navbar">
<div class="container-fluid">
<div class="dropdown" style="margin-left: 15px;">
<button class="dropbtn">ROREG</button>
<div class="dropdown-content" style="margin-left: 20px;">
<a href="#">Istoric</a>
<a href="#">Valoare propusa</a>
<a href="#">Conducere</a>
<a href="#">Responsabilitate sociala</a>
<a href="#">Cariera</a>
</div>
</div>
<div class="dropdown" style="margin-left: 5%;">
<button class="dropbtn">FONDURI EUROPENE</button>
<div class="dropdown-content" style="height: 132px; margin-left: 20px;">
<a href="#">Catalog</a>
<a href="#">Perioadele</a>
<a href="#">Regulamente europene</a>
</div>
</div>
</nav>