Hello! I am currently using Bootstrap 4 and attempting to create a navbar menu. Below is the code I have written:
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="#">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#">Features</a></li>
<li class="nav-item"><a class="nav-link" href="#">Pricing</a></li>
</ul>
</div>
<ul class="navbar-nav"><li class="nav-item">Login</li></ul>
</nav>
My goal is to have certain items in the navbar not collapse while positioning them on the right side. Initially, I moved the desired item after the toggler button, which worked well but displayed incorrectly on smaller devices.
I then tried placing the item after the collapse div element, but this caused issues with collapsing on smaller screens. Finding the perfect balance has been a challenge, so any advice would be appreciated!