cssmobilebootstrap-4navbarcanjs

Navbar not sizing to fit mobile screen


Here is my site https://cleveroscar.github.io./ I want to make my navbar fit the mobile screen to be usable, but when tested on my iphone the navbar is super tiny, check on dev tools to see what I am talking about, here is the code below, I am using CanJS to support my view and bootstrap 4 for my css frame work.

    <div><!-- nav starting div -->
      <nav class="navbar navbar-expand-lg navbar-dark" id="navbg">
        <a class="navbar-brand" href="https://cleveroscar.github.io./">Clever Oscar</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"> </span>
        </button>

        <div class="collapse navbar-collapse" id="navbarSupportedContent">
          <ul class="navbar-nav mr-auto">
            <li class="nav-item active ">
              <a class="nav-link" href="#">About <span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item ">
              <a class="nav-link" href="#">Projects</a>
            </li>
            <li class="nav-item ">
              <a class="nav-link" href="https://github.com/CleverOscar">Github</a>
            </li>
            <li class="nav-item ">
              <a class="nav-link" href="https://twitter.com/CleverOscarDev">Twitter</a>
            </li>
          </ul>
        </div>
      </nav>
    </div> <!-- nav ending div -->

I also have a git repository to look at the code if anyone wants too


Solution

  • what you need is a viewport metatag, so viewport scales with your screensize
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0"/>