Restoring expanded responsive navbar menu creates scrollbar in Bootstrap 3.0.2
css, navbar, twitter-bootstrap, twitter-bootstrap-3
Solution
This is a known issue in 3.0.2 (https://github.com/twbs/bootstrap/issues/11243)
A workaround:
.navbar-collapse.in {
overflow-y: visible;
}
Demo: http://bootply.com/96924
Problem
The following code works as expected with Bootstrap 3.0.0 CSS file, but when using it with Bootstrap 3.0.2 CSS (and I think 3.0.1, too), it does not work correctly under the following scenario: - Open page. - Resize browser window (make it smaller) to trigger responsive menu. - Expand menu so it displays Submenus 1 and 2. - Resize browser window (make it bigger) to trigger normal menu. The expanded menu does not get displayed on the page. It looks like its height is contained within the height of the navbar, so it shows with scrollbars. From this point on the drop-down menu does not drop beyond the bottom margin of the navbar, so you need to use the scrollbar to navigate it. If you reference the 3.0.0 version of the bootstrap CSS, then it works fine. I tried it with both versions of the Bootsrap JS file, and it does not seem to make any difference. Here is the complete HTML code: ``` <!DOCTYPE html> <html lang="en-us"> <head> <!--<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" type="text/css">--> <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" type="text/css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/jscript"></script> <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js" type="text/javascript"></script> <style> body { padding-top: 50px; } </style> </head> <body> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <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> </button> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">MENU<b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Submenu 1</a></li> <li><a href="#">Submenu 2</a></li> </ul> </li> </ul> </div> </div> </div> </div> </div> </div> <h1>Hello!</h1> </body> </html> ``` is this a known issue with Bootstrap or am I doing something wrong?