title: Bootstrap 4: How to make top fixed navbar stay in container and not stretch?
body: <p>I'm sorry for my question is may be duplicated to <strong>this</strong>:<br>
  <a href="https://stackoverflow.com/questions/14742906/bootstrap-fixed-navbar-inside-div">Bootstrap fixed navbar inside div</a>  <strong>or this:</strong><br>
  <a href="https://stackoverflow.com/questions/17308130/twitter-bootstrap-how-to-make-top-fixed-navbar-stay-in-container-and-not-stretc">Twitter Bootstrap: How to make top fixed navbar stay in container and not stretch?</a><br>
  or many similiar, but three years has passed, and Bootstrap has almost updated it's version from 2-nd to 4-th but problems remains still the same.<br>
  So I'm looking for some elegant and simple way to make fixed navbar stay inside parents div.container.<br>
  Here's the code, that I've copied and changed a little bit, from official documentation: </p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;nav class="navbar navbar-fixed-top navbar-light bg-faded"&gt;
          &lt;button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" 
              data-target="#navbarResponsive" aria-controls="navbarResponsive" 
              aria-expanded="false" aria-label="Toggle navigation"&gt;
          &lt;/button&gt;
          &lt;div class="collapse navbar-toggleable-md" id="navbarResponsive"&gt;
              &lt;a class="navbar-brand" href="#"&gt;
                  &lt;img src="" width="30" height="30" class="d-inline-block align-top" alt=""&gt;Navbar
              &lt;/a&gt;
              &lt;ul class="nav navbar-nav float-md-right"&gt;
                  &lt;li class="nav-item active"&gt;
                      &lt;a class="nav-link" href="#"&gt;Home 
                          &lt;span class="sr-only"&gt;(current)&lt;/span&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Link&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Link&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/nav&gt;
  &lt;/div&gt; 
  </code></pre>