My navigation bar uses Bootstrap 5. The problem is that the dropdown item for the user icon (login) is not showing up. This is my code:
<button class="btn dropdown-toggle" type="button" id="userDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa-solid fa-user text-white fs-5"></i> </button> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown"> <a class="dropdown-item" href="#">Login</a> </div>
For Boostrap 5, you need
data-bs-toggle="dropdown"
instead ofdata-toggle
: