Bootstrap Navbar only showing collapsed edit: Fixed But Navbar not collapsing
Edit:
I have now fixed this issue, but now the navbar will not collapse.
Does this mean my media queries are missing?
Which folder should these be in? It has been a while since I added them and I cannot find them in my less/css files
I am quite new to web-design so am having some issues with my navbar
It was displaying fine and collapsing fine, but Less wasn't compiling as there was an issue with my folders structure. When I changed the bootstrappath (@bootstrappath) I could compile my work again but my navbar broke.
Instead of showing my default navbar and collapsed navbar on small screen, my navbar shows as just one line and a drop down menu when you click on it.
I am concerned it is something to do with me changing the bootstrap path and I have no idea how to fix it. I have tried changing the @grid-float-breakpoint but with no luck.
Here is my code
<nav class="navbar navbar-default text-center">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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 id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/">Home</a></li>
<li><a href="/about.php">About</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Services <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/services/seo.php">Search Engine Optimisation</a></li>
<li><a href="/services/media-management.php">Social Media Management</a></li>
<li><a href="/services/analysis.php">Analysis</a></li>
</ul>
</li>
<li><a href="/blog.php">Blog</a></li>
<li><a href="/blog.php">Our Clients</a></li>
<li><a href="/contact.php">Contact</a></li>
</ul>
</div>
</div>
</nav>
Any help much appreciated. All was fine until I got a new laptop and transferred the files over and since then it has gone rather wrong. I am rather new to this so please go easy on me! Thanks
链接地址: http://www.djcxy.com/p/89466.html上一篇: 悬停容器时更改内部div