Bootstrap 3 Navbar not responding

I tested my boot site on different devices to ensure its responsiveness. I have all the right resizing for different display sizes except navbar. In my browser, when I resize the window horizontally, it seems that it is responding, the menu is crashing as expected, but on mobile devices I still see the navigation bar as if it was displayed in a full screen window on the desktop or laptop. Here is the code for my navigator:

<div class="container">
  <nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid">
      <div class="navbar-header">
        <a class="navbar-brand" href="#">
          <img alt="WinShir" src="img/rocket.png" /> WinShir
        </a>
        <button type='button' class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="sr-only">Toggle Navigation</span>
        </button>
      </div>

      <ul class="nav navbar-nav navbar-right collapse navbar-collapse">
        <li><a href="#signInModal" data-toggle="modal">Sign In</a></li>
        <li><a href="#signupModal" data-toggle="modal">Sign Up</a></li>
      </ul>
    </div>

  </nav>
</div>

I tried changing the nav element to a div to make sure this helped without success. I also removed the container class container to make sure this didn't help either.

+4
1

, . <head> , .

<meta name="viewport" content="width=device-width, initial-scale=1">
+16

Source: https://habr.com/ru/post/1584602/


All Articles