Reputation: 1
how to align bootstrap navbar in center of the page. Below is my code and i want it to be aligned in center. i tried several things but not working. Can you please help me with this.
<nav class="navbar header-navbar hidden-xs" role="navigation">
<ul class="nav navbar-nav">
<li><a href="index.html" class="active-link">HOME</a></li>
<li><a href="products.html">PRODUCTS</a></li>
<li><a href="about.html">ABOUT</a></li>
<li><a href="contact.html">CONTACT</a></li>
<li><div class="cart-area"><a href="cart.html">Cart: 0</a></div></li>
</ul>
</nav>
Upvotes: 0
Views: 75
Reputation: 312
Someone else posted the solution to a similar question: link
shoud work:
@media (min-width: 768px){
.navbar-nav{
float:none;
margin: 0 auto;
display: table;
table-layout: fixed;
}
}
Upvotes: 1