I am rather new to using Bootstrap, and would love for one of you pros out there to show me where I am making my mistake.
What I am trying to accomplish: I am working on a responsive website using Bootstrap. I wish for my navbar to be fixed at the top, and when the web page is reduced to a mobile size, I would like for my navbar to show menu items when pressed.
The problem: While in mobile browser dimensions, the navbar will not show any menu items when pressed. There is no toggle.
What I have tried: I have browsed through other user's StackOverflow questions and comments, in which the majority have said to make sure the "data-toggle" matches up with the id selector following the "collapse navbar-collapse" class.
You will find that these match up. myNavbar is an id selector. Solution does not work.
<div class="container-fluid" id="contentsOfMenu"> <div class="navbar-header page-scroll"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class"page-scroll"> <a href="#welcome" id="brandLabel"><img src="images/brainFishIconMenu.png"/></a> <a class="navbar-brand" href="#welcome" >BrainFish</a> </div> </div><!--end of navbar-header---------------------------> <div class="collapse navbar-collapse" id="myNavbar"> <ul class="nav navbar-nav navbar-right" id="navLinkColor"> <li class="page-scroll"><a href="#aboutUs">About</a></li> <li class="page-scroll"><a href="#services">Services</a></li> <li class="page-scroll"><a href="#approach">Approach</a></li> <li class="page-scroll"><a href="#contact">Contact</a></li> </ul> </div><!--end of myNavBar--> </div><!--end of contentsOfMenu---------------------> </nav><!--end of navigation-->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">.