Why does twitter bootstrap’s navbar-fixed-top
or navbar-fixed-bottom
makes a navbar full width and cancels the effect of .container
which centers a navbar? See code below
<div class="container">
<nav class="navbar navbar-fixed-top navbar-full navbar-dark bg-inverse">
<a class="navbar-brand" href="#">Navbar</a>
</nav>
</div>
Can someone explain this?
2
Answers
Did you try add your container class to nav element?
I guess it should help a little and if you add your own class like text-center with css: text-align:center; that should help you 🙂
I did manage to make it work by adding the class
container
inside the<div class="navbar navbar-inverse navbar-fixed-top">
This is how my code looks like.
You can see it working here:
Codepen