title: How to center nav-items in Bootstrap?
body: <p>What if I want to center the nav-items (links) on the navbar according to the browser window size in Bootstrap 4. Take a look at the code:</p>
  
  <pre><code>&lt;nav class="navbar navbar-toggleable-md navbar-light bg-faded"&gt;
      &lt;button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"&gt;
          &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
      &lt;/button&gt;
      &lt;a class="navbar-brand" href="#"&gt;Navbar&lt;/a&gt;
      &lt;div class="collapse navbar-collapse" id="navbarNavAltMarkup"&gt;
          &lt;div class="navbar-nav"&gt;
              &lt;a class="nav-item nav-link active" href="#"&gt;Home &lt;span class="sr-only"&gt;(current)&lt;/span&gt;&lt;/a&gt;
              &lt;a class="nav-item nav-link" href="#"&gt;Features&lt;/a&gt;
              &lt;a class="nav-item nav-link" href="#"&gt;Pricing&lt;/a&gt;
              &lt;a class="nav-item nav-link disabled" href="#"&gt;Disabled&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>Now I want to center the div "navbar-nav" according to browser width. One thing that I have tried is giving it mr-auto and ml-auto which does seem to center it but not exactly. What it actually does it centers it according to the width "browser window width - logo width" . I want it centered exactly in the middle of the screen.</p>
  
  <p>I have tried changing position to absolute as well but again that kind of messes up layout in collapsed mode as well.</p>