title: Bootstrap navbar-right not aligning nav-items to the right
body: <p>I have a website navbar with a navbar toggler for mobile, and I am trying to get two nav-items (for login/registration, etc.) to align to the right of the navbar but for whatever reason, the suggested method of using the <code>navbar-right</code> class won't work.</p>
  <p>Here's the code:</p>
  <pre><code>    &lt;!-- Navbar --&gt;
      &lt;nav class=&quot;navbar navbar-expand-md navbar-dark fixed-top bg-dark&quot;&gt;
  
          &lt;a class=&quot;navbar-brand&quot; href=&quot;/index.php&quot;&gt;&lt;img src=&quot;/assets/img/logo_white.png&quot; style=&quot;height: 35px;&quot;&gt;&lt;/a&gt;
          &lt;button class=&quot;navbar-toggler&quot; type=&quot;button&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#navbarNavDropdown&quot; aria-controls=&quot;navbarNavDropdown&quot; aria-expanded=&quot;false&quot; aria-label=&quot;Toggle navigation&quot;&gt;
              &lt;span class=&quot;navbar-toggler-icon&quot;&gt;&lt;/span&gt;
          &lt;/button&gt;
  
          &lt;div class=&quot;collapse navbar-collapse&quot; id=&quot;navbarNavDropdown&quot;&gt;
  
              &lt;ul class=&quot;nav navbar-nav&quot;&gt;
  
                  &lt;li class=&quot;nav-item &lt;?php if ($sect == 'home') { echo 'active';} ?&gt;&quot;&gt;
                      &lt;a class=&quot;nav-link&quot; href=&quot;/index.php&quot;&gt;Home&lt;/a&gt;
                  &lt;/li&gt;
  
                  &lt;li class=&quot;nav-item dropdown &lt;?php if ($sect == 'about') { echo 'active';} ?&gt;&quot;&gt;
                      &lt;a class=&quot;nav-link dropdown-toggle&quot; href=&quot;#&quot; id=&quot;navbarDropdownMenuLink&quot; data-toggle=&quot;dropdown&quot; aria-haspopup=&quot;true&quot; aria-expanded=&quot;false&quot;&gt;
                          About
                      &lt;/a&gt;
                      &lt;div class=&quot;dropdown-menu&quot; aria-labelledby=&quot;navbarDropdownMenuLink&quot;&gt;
                          &lt;a class=&quot;dropdown-item &lt;?php if ($page == 'about-us') { echo 'active';} ?&gt;&quot; href=&quot;/about/about-us.php&quot;&gt;About Us&lt;/a&gt;
                          &lt;a class=&quot;dropdown-item &lt;?php if ($page == 'staff') { echo 'active';} ?&gt;&quot; href=&quot;/about/staff.php&quot;&gt;Staff Team&lt;/a&gt;
                          &lt;a class=&quot;dropdown-item &lt;?php if ($page == 'partners') { echo 'active';} ?&gt;&quot; href=&quot;/about/partners.php&quot;&gt;Partners&lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
  
                  &lt;li class=&quot;nav-item dropdown &lt;?php if ($sect == 'resources') { echo 'active';} ?&gt;&quot;&gt;
                      &lt;a class=&quot;nav-link dropdown-toggle&quot; href=&quot;#&quot; id=&quot;navbarDropdownMenuLink&quot; data-toggle=&quot;dropdown&quot; aria-haspopup=&quot;true&quot; aria-expanded=&quot;false&quot;&gt;
                          Resources
                      &lt;/a&gt;
                      &lt;div class=&quot;dropdown-menu&quot; aria-labelledby=&quot;navbarDropdownMenuLink&quot;&gt;
                      &lt;a class=&quot;dropdown-item &lt;?php if ($page == 'downloads') { echo 'active';} ?&gt;&quot; href=&quot;/resources/downloads.php&quot;&gt;Downloads&lt;/a&gt;
                      &lt;a class=&quot;dropdown-item &lt;?php if ($page == 'charts') { echo 'active';} ?&gt;&quot; href=&quot;/resources/charts.php&quot;&gt;Charts&lt;/a&gt;
                      &lt;a class=&quot;dropdown-item &lt;?php if ($page == 'metar') { echo 'active';} ?&gt;&quot; href=&quot;/resources/metar.php&quot;&gt;METAR Decoder&lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
  
                  &lt;li class=&quot;nav-item &lt;?php if ($sect == 'academy') { echo 'active';} ?&gt;&quot;&gt;
                      &lt;a class=&quot;nav-link&quot; href=&quot;/academy/index.php&quot;&gt;Academy&lt;/a&gt;
                  &lt;/li&gt;
  
                  &lt;li class=&quot;nav-item &lt;?php if ($sect == 'fly') { echo 'active';} ?&gt;&quot;&gt;
                      &lt;a class=&quot;nav-link disabled&quot; href=&quot;#&quot;&gt;Fly&lt;/a&gt;
                  &lt;/li&gt;
  
                  &lt;li class=&quot;nav-item &lt;?php if ($sect == 'forums') { echo 'active';} ?&gt;&quot;&gt;
                      &lt;a class=&quot;nav-link&quot; href=&quot;https://forums.multicrew.co.uk/&quot;&gt;Forums&lt;/a&gt;
                  &lt;/li&gt;
  
                  &lt;li class=&quot;nav-item &lt;?php if ($sect == 'book') { echo 'active';} ?&gt;&quot;&gt;
                      &lt;a class=&quot;nav-link&quot; href=&quot;https://multicrew.setmore.com/&quot;&gt;Book&lt;/a&gt;
                  &lt;/li&gt;
                  
              &lt;/ul&gt;
  
              &lt;ul class=&quot;nav navbar-nav navbar-right&quot;&gt;
  
                  &lt;li class=&quot;nav-item&quot;&gt;
                      &lt;a class=&quot;nav-link&quot; href=&quot;https://portal.multicrew.co.uk/&quot;&gt;&lt;i class=&quot;fa fa-sign-in&quot;&gt;&lt;/i&gt; Login&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class=&quot;nav-item&quot;&gt;
                      &lt;a class=&quot;nav-link&quot; href=&quot;https://portal.multicrew.co.uk/register&quot;&gt;&lt;i class=&quot;fa fa-user&quot;&gt;&lt;/i&gt; Register&lt;/a&gt;
                  &lt;/li&gt;
  
              &lt;/ul&gt;
  
          &lt;/div&gt;
      &lt;/nav&gt;
      &lt;!--/END Navbar--&gt;
  </code></pre>