Struggling to align only the navigation items to the right of the webpage without moving the navbar-brand. I've tried various CSS solutions, but nothing seems to work. The code below moves the entire navbar to the right, but that's not exactly what I'm looking for:
nav {
background-color: white;
float: right;
}
If you have any suggestions or ideas on how to achieve this, I would greatly appreciate it. Thank you!
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="#">Portfolio</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Blogs</a>
</li>
<li class="nav-item">
<a class="nav-link " href="#">Projects</a>
</li>
<li class="nav-item">
<a class="nav-link " href="#">LinkedIn</a>
</li>
</ul>
</div>
</nav>