<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="/dropdownmenus/contenido/5.company.html" id="navbarDropdownCompany" role="button" data-bs-toggle="dropdown" aria-expanded="false">COMPANY</a>
<ul class="dropdown-menu">
<li class="dropstart">
<a class="dropdown-item dropdown-toggle" data-bs-toggle="dropdown" href="/dropdownmenus/contenido/5.1.overview.html" id="navbarDropdownOverview" role="button"
data-bs-toggle="dropdown" aria-expanded="false"> OVERVIEW </a>
<ul class="dropdown-menu" >
<li><a class="dropdown-item" href="/dropdownmenus/contenido/5.1.1.revenue.html">REVENUE</a></li>
<li><a class="dropdown-item" href="/dropdownmenus/contenido/5.1.2.subscribers.html">SUBSCRIBERS</a>
</LI
</ul>
</li>
I am trying to implement a submenu in a dropdown in Bootstrap5, it isn’t working properly after a few days trying. Does anyone know where my code is wrong?
About the image,
The subdropdown isn’t working when I put my pointer over it or I click on it
I tried the previous code
This is how it looks now
2
Answers
I tried and this is what happens it first appears like this
And after I click the button again it looks like this
Try to add "show" to
<ul class="dropdown-menu" >
like this
<ul class="dropdown-menu show" >