Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get "divider" displayed for "nav-pills" and "nav-stacked"

Tags:

Have code something like the following:

<div class="container">

<div class="row">
    <div class="col-sm-3">
        <ul class="nav nav-pills nav-stacked">
            <li><a href="#">Available glyphs</a></li>
            <li class="disabled"><a href="#">How to use</a></li>
            <li><a href="#">Examples</a></li>
            <li class="divider"></li>
            <li><a href="#">Example</a></li>
        </ul>
    </div>
    <div class="col-sm-3">
        <ul class="nav nav-pills nav-stacked">
            <li><a href="#">Basic example</a></li>
            <li><a href="#">Vertical variation</a></li>
            <li class="divider"></li>
            <li><a href="#">Single button dropdowns</a></li>
        </ul>
    </div>
    <div class="col-sm-3">
        <ul class="nav nav-pills nav-stacked">
            <li><a href="#">Basic example</a></li>
            <li><a href="#">Checkboxes and radio addons</a></li>
            <li class="divider"></li>
            <li><a href="#">Justified</a></li>
        </ul>
    </div>
    <div class="col-sm-3">
        <ul class="nav nav-pills nav-stacked">
            <li><a href="#">Fixed to bottom</a></li>
            <li><a href="#">Static top</a></li>
            <li><a href="#">Inverted navbar</a></li>
        </ul>
    </div>
</div>

class "divider" is not working. Am I missing something?

http://jsfiddle.net/isherwood/B9gHc

like image 597
user203687 Avatar asked Dec 18 '13 17:12

user203687


2 Answers

The divider class has changed to nav-divider in Bootstrap 3..

 <li class="nav-divider"></li> 

So you can use this without any custom CSS. http://bootply.com/101379

UPDATE

.nav-divider has been deprecated in v3.0.1

like image 161
Zim Avatar answered Oct 31 '22 15:10

Zim


<li class="nav-item"><hr style="width:90%;"></li>

Because of the deprecation. Change according to your liking.

like image 26
Snipe Avatar answered Oct 31 '22 16:10

Snipe