I want the elements of a navbar to be on the center, I have the following html:
<div class="navbar navbar-default navbar-fixed-bottom" style="bottom:50px; background:none; border:0px; box-shadow:none;">
<div class="navbar-inner" style="float: none;">
<div class="container-fluid" >
<ul class="nav navbar-nav" >
<li><img class="social-media" src="images/facebook.png"></li>
<li><img class="social-media" src="images/twitter.png"></li>
<li><img class="social-media" src="images/linkedin.png"></li>
</ul>
</div>
</div>
</div>
and here is my css:
.social-media {
opacity: 0.4;
margin-left: 15px;
width: 32px;
height: 32px;
}
.social-media:hover {
opacity: 1;
margin-left: 15px;
width: 32px;
height: 32px;
}
I tried to use text-align:center;
on navbar inside the html but it didnt work. Any idea how can I solve this?
I've tried to change the bootstrap.css to
@media (min-width: 768px) {
.navbar-nav {
float: none;
margin: 0 auto;
float: none;
width: 100%;
}
.navbar-nav > li {
float: none;
text-align: center;
}
and now I have this:
after editing bootstrap.css to :
.navbar-nav {
margin: 0;
display:inline-block !important;
float:none !important;
}
I finally got: