i have bootstrap menu, use position: fixed not scroll menu, small display, burger menu doesn't work, when delete position: fixed, works menu scrolled page content :
my html:
<div class="col-sm-2"> <div class="sidebar-nav"> <div class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="navbar-collapse collapse sidebar-navbar-collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">menu item 1</a></li> <li><a href="#">iterm1</a></li> <li><a href="#">item2</a></li> <li><a href="#">item3</a></li> </ul> </div><!--/.nav-collapse --> </div> </div> </div> <div class="col-sm-10"> content blabla </div>
my css :
.navbar-default { position: fixed; }
please check example code here codepen
html:
<div class="col-sm-12"> <div class="sidebar-nav"> <div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="navbar-collapse collapse sidebar-navbar-collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">menu item 1</a></li> <li><a href="#">iterm1</a></li> <li><a href="#">item2</a></li> <li><a href="#">item3</a></li> </ul> </div> <!--/.nav-collapse --> </div> </div> </div> <div class="col-sm-10"> content blabla </div> </div>
Comments
Post a Comment