Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter Bootstrap 3 - Navbar not horizontal

I'm fiddlin' around with bootstrap 3. I'm trying to make an horizontal navbar except it doesn't turn out horizontal. I thought the navbar should be horizontal out of the box, do I perhaps need some additional css?

I tried to make a navbar copying code from the bootstrap documentation like this:

<div class="row">
    <div class="col-12">            
        <div class="navbar">
          <div class="navbar-inner">
            <a class="brand" href="#">Title</a>
            <ul class="nav">
              <li class="active"><a href="#">Home</a></li>
                <li><a href="#">Link</a></li>
                  <li><a href="#">Link</a></li>
            </ul>
          </div>
        </div> 
    </div>
</div>

http://jsfiddle.net/FxkZT/

like image 629
Quantize Avatar asked Aug 12 '13 15:08

Quantize


Video Answer


1 Answers

DEMO

Your code is for BootStrap 2 and needs to be changed. In bootstrap 3:

  1. <a class="brand" href="#">Title</a> becomes <a class="navbar-brand" href="#">Title</a>
  2. <ul class="nav"> becomes <ul class="nav navbar-nav">
  3. No more need for <div class="navbar-inner">

More info in the doc here.

like image 83
edsioufi Avatar answered Oct 24 '22 18:10

edsioufi