I have created a navigation bar using Bootstrap 4 and included the .navbar-bottom class to enable scrollbar functionality when there are more menu items than the total width of the page.
However, an issue has arisen where the Bootstrap 4 navbar dropdown opens within the navbar itself. You can see this problem in the GIF screenshot below:
Screenshot GIF View Here
.navbar-bottom class for scrollbar in navbar
.navbar-bottom {
overflow-x: auto;
white-space: nowrap;
}
HTML
<nav class="navbar navbar-expand navbar-light navbar-bottom">
<ul class="navbar-nav mr-auto pl-2">
<li class="nav-item"><a class="nav-link px-6" href="#">Menu Item</a></li>
<li class="nav-item">
<div class="dropdown">
<a class="nav-link" href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<div class="dropdown-menu">
<a href="#" class="dropdown-item">Dropdown1</a>
<a href="#" class="dropdown-item">Dropdown2</a>
<a href="#" class="dropdown-item">Dropdown3</a>
<a href="#" class="dropdown-item">Dropdown4</a>
</div>
</div>
</li>
<li class="nav-item"><a class="nav-link px-6" href="#">Menu Item</a></li>
.........................................................................
.........................................................................
.........................................................................
.........................................................................
<li class="nav-item"><a class="nav-link px-6" href="#">Menu Item</a></li>
</ul>
</nav>