Currently, my navbar is styled with a "shrinkwrap" background to match the width of the content:
<nav class="navbar fw-bold h5 rounded-5 navbar-expand d-inline-flex">
<div class="container-fluid">
<ul class="navbar-nav">
<li class="nav-item">
<NavLink class="nav-link" :to="{ name: 'Home' }">Home</NavLink>
</li>
[...]
</ul>
</div>
</nav>
By default, Bootstrap collapses the navbar at a predefined pixel width, like 992px with .navbar-expand-lg
:
https://i.sstatic.net/xOdZl.gif
However, I want the navbar to collapse only when the viewport is not wide enough to contain it, as shown when the horizontal scrollbar appears in this image:
https://i.sstatic.net/GeBkK.gif
Is it possible to achieve this using Bootstrap styling? It seems to be oriented towards specific fixed pixel breakpoints rather than adapting to natural content width.