I'm attempting to modify the Bootstrap navbar's behavior so that it utilizes a horizontal scroll instead of collapsing. While this works on mobile devices, I want it to function the same way on all devices using SASS:
.navbar-nav {
li {
display: inline-block; // prevents menu items from stacking
}
}
.scroll {
white-space: nowrap;
overflow-x: scroll; // provide scrolling capability
-webkit-overflow-scrolling: touch;
}
Here is an image demonstrating its successful implementation in mobile view: https://i.sstatic.net/zMHys.png
However, as the viewport size increases and media queries are activated, the horizontal scroll feature gets completely disabled:
https://i.sstatic.net/WIlIM.png
And lastly, when viewed on desktop:
https://i.sstatic.net/P9Yjp.png
HTML:
<div class="navbar-header">
<a class="navbar-brand" href="#"><i class="fa fa-home"></i></a>
</div>
<ul class="nav navbar-nav scroll">
<li><a href="#">Hyperlink</a></li>
<li><a href="#">Hyperlink</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret hidden-xs"></span></a>
...
</li>
<li><a href="#">Hyperlink</a></li>
<li><a href="#">Hyperlink</a></li>
<li><a href="#">Hyperlink</a></li>
<li><a href="#">Hyperlink</a></li>
<li><a href="#">Hyperlink</a></li>
<li><a href="#">Hyperlink</a></li>
</ul>
Is there a way to maintain the horizontal scroll functionality throughout the entire site? I'm having trouble pinpointing which CSS rule is altering its behavior. Additionally, I need the .navbar and .navbar-header elements to stay in line, as they are currently stacking as well.