I'm struggling to figure out how to organize a Bootstrap 4 menu with numerous links.
Currently, when I include too many links, the navbar disregards the container and expands its width beyond the container.
Here is an image for better clarification:
https://i.sstatic.net/8TE79.png
I want to structure the menu in a way that keeps all the menu items within the grey container even if there are too many items.
For example, how can I make the items go to the next line if there are too many of them?
Here is my code:
<header>
<div class="container">
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#"><img src="assets/img/logo.png" width="160px"></a>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item text-center active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item text-center">
<a class="nav-link" href="#">Features</a>
</li>
...continued...
</ul>
</div>
</nav>
</div>
</header>