I want to horizontally center a navbar in an ASP.Net Core MVC Web app. I have tried a ton of different things, but nothing is working.
Left and right justify work as expected. However, there is no obvious option for navbar-center (or something equivalent). Since Bootstrap is included in VS2017, I want to modify the CSHMTL - not .css.
There must be an easy way to do this. What am I missing?
<nav class="navbar navbar-inverse navbar-fixed-top" style="background-color:white; border-color: white">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- This is what I want to center. Navbar-right and navbar-left work perfectly. -->
<div class="navbar-collapse collapse" style="background-color:white; border-color: white">
<ul class="nav navbar-nav navbar-left" style="background-color: white; border-color: white">
<li><a asp-area="" asp-controller="Home" asp-action="About">About</a></li>
<li><a asp-action="Create">Create</a></li>
</ul>
</div>
</div>
</nav>