Issue
I'm new to Bootstrap and just trying to get the collapsed dropdown nav bar to behave. It resizes perfectly, all the way up to the point that the window is so small that it triggers all the nav bar items being removed and placed inside the little data-toggle button. Because when I click that lil' data-toggle button, it does not expand and show the items in a drop down list like its supposed to.
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header logo">
<a class="navbar-brand" href="index.html"><img src="images/nastilogowhite.png" class="img-responsive" style="margin: 0 auto;"></a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#nav-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="nav-collapse">
<!-- Individual Navbar elements -->
<ul class="nav nav-justified nasti-nav">
<li class="active"><a href="index.html">Home</a></li>
<li class="divider"></li>
<li><a href="familylaw.html">Family Law</a></li>
<li class="divider"></li>
<li><a href="criminallaw.html">Criminal Law</a></li>
<li class="divider"></li>
<li><a href="conveyancing.html">Conveyancing</a></li>
<li class="divider"></li>
<li><a href="about.html">About</a></li>
<li class="divider"></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
</div> <!-- Container fluid-->
</nav>
I've used this identical code on all pages, however for some reason it only works on the home page of this site. The only difference between the home page and other pages is that beneath the <nav> tags there is another div of content containing the main text for that page & an image. That said, when I delete the entire code for this div from my page, the problem persists so I don't think its that....
I may also be (over)using redundant classes, but thats a story for later...
Solution
I used the same code and it is working perfectly, check at http://jsbin.com/henume/2/edit?html,output
You mentioned that it resizes properly, so i assume that the bootstrap.css is working. Please make sure the jQuery.js and boostrap.js are included in the page.
Answered By - nasirkhan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.