Currently, I am in the process of developing a website and aiming to incorporate a dropdown submenu feature that activates on hover using Bootstrap 4.1
To achieve this effect, I have utilized the following HTML code:
<div class="navbar-collapse text-center" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Main Menu
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">P</a>
<a class="dropdown-item" href="#">Q</a>
<a class="dropdown-item" href="#">R</a>
<a class="dropdown-item" href="#">S</a>
</div>
</li>
<button type="submit" onclick="location.href='/M';" class="btn btn-default">R</button>
</ul>
</div>
The current HTML code successfully displays P, Q, R, and S on hover.
Issue at Hand:
I am now faced with the challenge of modifying the code above to display dropdown items T, U, V, and W when hovering over S. Any suggestions on what changes need to be made to accomplish this task?