I want to add a dropdown to the navbar, but ensure that when the browser is resized to a narrower width, the dropdown remains visible in the navbar and is not included in the nav-collapse.
The html below works. However, when the page resizes, the dropdown drops onto the next row, and displays expanded in the navbar, leaving me with a very deep navbar.
I'm calling bootstrap-collapse.js and bootstrap-dropdown.js.
Anyone got any ideas?
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Project</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
<div class="container">
<ul class="nav pull-right">
<li class="divider-vertical"></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Sharing<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Twitter</a></li>
<li><a href="#">Facebook</a></li>
<li><a href="#">Google+</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>