I want to align the logout button to the right within my bootstrap navbar.
https://i.stack.imgur.com/PDvSv.png
Here is a demonstration of the current behavior: https://codepen.io/agrawalo/pen/mdbKYLX
Code:
<nav class="mb-1 navbar navbar-expand-sm navbar-dark bg-dark sticky-top">
<div class="container">
<!-- Collapse content -->
<div class="justify-content-end">
<!--Links-->
<ul class="navbar-nav">
<li class="nav-item {% if current == 'Allocate' %}active{% endif %}">
<a class="nav-link" href="/">Allocate Stocks</a>
</li>
<li class="nav-item {% if current == 'Portfolio' %}active{% endif %}">
<a class="nav-link" href="/portfolio">Portfolio</a>
</li>
<li class="nav-item {% if current == 'Transactions' %}active{% endif %}">
<a class="nav-link" href="/transactions">Transactions</a>
</li>
<li class="nav-item">
<a class="nav-link {% if current == 'Leaderboard' %}active{% endif %}" href="/leaderboard">Leaderboard</a>
</li>
<li class="nav-item {% if current == 'Rules' %}active{% endif %}">
<a class="nav-link" href="/rules">Rules</a>
</li>
<li class="nav-item {% if current == 'Resources' %}active{% endif %}">
<a class="nav-link" href="/resources">Resources</a>
</li>
<li class="nav-item justify-content-end">
<a class="nav-link" href="/logout">Logout</a>
</li>
</ul>
</div>
</div>
</nav>
How can I achieve this alignment?