Answer the question
In order to leave comments, you need to log in
Why doesn't bootstrap navbar work on mobile?
Hello! Not opening "sandwich" on non-PC screens in bootstrap navbar. Here is the code:
<nav class="navbar navbar-fixed-top navbar-custom navbar-transparent">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#custom-collapse">
<span class="sr-only">Навигация</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
<img class="light-logo" src="assets/images/logo.png" width="185">
</a>
</div>
<div class="collapse navbar-collapse" id="custom-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a class="white" href="#news">Новости</a></li>
<li><a href="/event/">Мероприятия</a></li>
</ul>
</div>
</div>
</nav>
Answer the question
In order to leave comments, you need to log in
Works for me. But the "sandwich" icon itself is not displayed (due to the non-connected Glyphicons font). Have you included this font? The navbar uses an icon from this font for the button to open / close the menu on the mobile. devices. And did you include jQuery before Bootstrap?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question