In Bootstrap 4 you define: <nav class="navbar ...
and the navigation bar occupies the entire width of the screen just like the elements.
And if we define the <nav>
within a div="container"
, bootstrap gives it side margins.
I want my menu to occupy what defines the div="container"
but that the bar of <nav>
occupy the full width of the screen.
<nav class="navbar navbar-expand-sm navbar-dark bg-dark">
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav text-center">
<a class="nav-item nav-link" href="#">Inicio</a>
<a class="nav-item nav-link" href="#">Servicios</a>
<a class="nav-item nav-link" href="#">Contacto</a>
</div>
</div>
</nav>