javascript - BootStrap have mobile navbar entire bar dropdown -
my site gitlit.org , when go mobile or scale browser navbar switches mobiel design without issues , can click 3 white lines (menu) button , works clicking home nothing. there way entire bar clickable?
my navbar code:
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">home</a> <div class="nav-collapse collapse"> <ul class="nav navbar-nav"> <li><a href="about.html">about us</a></li> <li><a href="#about">resources</a></li> <li><a href="sermons.php">sermons</a></li> <li><a href="#contact">contact us</a></li> <li><a href="#contact">ministries</a></li> <li><a href="#contact">blog</a></li> </ul> </div> </div>
here custom css applied navbar, did not edit main bootstrap css:
.navbar { background-color: #000; float: none; } .navbar-toggle { border: 0px solid #000; border-radius: 6px; } .navbar-nav > li > { color: white; font-size: 13px; text-decoration: none; text-transform: uppercase; } .navbar-nav > .active > a, .navbar-nav > .active > a:hover, .navbar-nav > .active > a:focus { background-color: #000; color: white; } .navbar-nav > .active > a:hover { color: #fdbb20; } .navbar-nav > li > a:hover, .navbar-nav > li > a:focus { color: #fdbb20; } .navbar-brand { color: white; font-size: 13px; text-decoration: none; text-transform: uppercase; } .navbar-brand:hover, .navbar-brand:focus { color: #fdbb20; }
if i'm understanding issue correctly... why home outside .navbar-nav
div?
shouldn't move inside rest of menu?
<div class="nav-collapse collapse"> <ul class="nav navbar-nav"> <li><a href="#">home</a></li> <li><a href="about.html">about us</a></li> <li><a href="#about">resources</a></li> <li><a href="sermons.php">sermons</a></li> <li><a href="#contact">contact us</a></li> <li><a href="#contact">ministries</a></li> <li><a href="#contact">blog</a></li> </ul> </div>
if want behave 3 little lines should add class
, 2 data-
attributes so:
<a href="#" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">home</a> <div class="nav-collapse collapse"> <ul class="nav navbar-nav"> <li><a href="about.html">about us</a></li> <li><a href="#about">resources</a></li> <li><a href="sermons.php">sermons</a></li> <li><a href="#contact">contact us</a></li> <li><a href="#contact">ministries</a></li> <li><a href="#contact">blog</a></li> </ul> </div>
let me know if meant , if worked you, if it's right answer question remember mark it... if not let me know can modify right answer :)
Comments
Post a Comment