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