title: Bootstrap 4 - Navbar items outside the collapse
body: <p>Ok so I have to admit this is something I have always struggled with getting to work correctly even in BS3. But I want to have navbar links outside of the collapsed container that stay persistent.</p>
  
  <p>This is what I have right now:</p>
  
  <pre><code>&lt;nav class="navbar fixed-top navbar-expand-lg navbar-template"&gt;
      &lt;a class="navbar-brand" href="#"&gt;Navbar&lt;/a&gt;
      &lt;button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"&gt;
          &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
      &lt;/button&gt;
      &lt;div class="collapse navbar-collapse" id="navbarNavDropdown"&gt;
          &lt;ul class="navbar-nav ml-auto"&gt;
              &lt;li class="nav-item"&gt;&lt;a class="nav-link" href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
              &lt;li class="nav-item"&gt;&lt;a class="nav-link" href="#"&gt;Features&lt;/a&gt;&lt;/li&gt;
              &lt;li class="nav-item"&gt;&lt;a class="nav-link" href="#"&gt;Pricing&lt;/a&gt;&lt;/li&gt;
              &lt;li class="nav-item dropdown"&gt;
                  &lt;a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown"&gt;Dropdown link&lt;/a&gt;
                  &lt;div class="dropdown-menu dropdown-menu-right"&gt;
                      &lt;a class="dropdown-item" href="#"&gt;Action&lt;/a&gt;
                      &lt;a class="dropdown-item" href="#"&gt;Another action&lt;/a&gt;
                      &lt;a class="dropdown-item" href="#"&gt;Something else here&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;ul class="navbar-nav"&gt;
          &lt;li class="nav-item"&gt;&lt;a class="nav-link" href="#"&gt;&lt;span class="fa fa-facebook"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li class="nav-item"&gt;&lt;a class="nav-link" href="#"&gt;&lt;span class="fa fa-twitter"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li class="nav-item"&gt;&lt;a class="nav-link" href="#"&gt;&lt;span class="fa fa-youtube"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li class="nav-item"&gt;&lt;a class="nav-link" href="#"&gt;&lt;span class="fa fa-linkedin"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/yfwWT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yfwWT.png" alt="enter image description here"></a></p>
  
  <p>This works until the first nav is in a collapsed state. When the collapse is active it looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/rU69C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rU69C.png" alt="enter image description here"></a></p>
  
  <p>Has anyone found a clean solution for this?</p>