Can someone help me with my navigation bar spacing issue?
I have a nav bar with a logo in the middle, but there is too much white space on either side. I want to evenly space out the navigation links like this
I currently achieved this by using padding-left and padding-right, but it feels like a hack. I tried googling for a solution but couldn't find one. Here is my current html with the padding I added.
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="glyphicon glyphicon-chevron-down pull-right"></span>
</button>
</div>
<a class="navbar-brand visible-lg visible-md hidden-sm hidden-xs"
style="background-image: url('/Content/Images/logo.png'); background-repeat: no-repeat; height: 94px; width: 301px; left: calc(50% - 148px); "
href='@Url.Action("Index", "Home")'></a>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav navbar-left">
<li id="lnkProducts">@Html.ActionLink("PRODUCTS", "Products", "Products")</li>
<li><a href="/flavour-lab" style="font-family: Foco-Regular; padding-left: 35%" class="paddingLeft">FLAVOUR LAB</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="/our-story" style=" font-family: Foco-Regular;padding-right:45%">OUR STORY</a></li>
<li id="lnkVisitUs"><a href="#" target="_blank" style=" font-family: Foco-Regular">VISIT US: <b>f</b></a></li>
<li id="lnkContactUs" class="visible-xs-block">@Html.ActionLink("CONTACT US", "Contact", "Contact") </li>
</ul>
</div>
</div>
</nav>
Thanks
** Update **
Here's the CSS for left and right nav bars as requested
.navbar-left {
float: left !important;
}
.navbar-right {
float: right !important;
}
** Update **
This is how it looks on a mobile screen