While using twitter bootstrap 3
, on mobile devices menu nabber
has horizontal and veritcal scrollers.
It was not there with 2.3
and I couldn't figure out how to disable it and let the menu items extend to full without any scroll-bars.
Create a navbar scrolling with the page in Bootstrap Bootstrap CSS Framework Web Development To create a navbar that scrolls with the page, add the.navbar-static-top class. This class does not require adding the padding to the <body>.
The Bootstrap navbar is a menu responsive header with navigation. Bootstrap supports enabling many UI effects with this navbar component. For example, Sticky navbar on scrolling the content. Mobile-friendly responsive menu navigation. This article is for creating a Bootstrap sticky navbar on the page top header.
But, since Twitter Bootstrap Dropdown takes help of JavaScript, so you need to insert following two lines of codes into the HTML page. You may insert them right before the </body> tag. For inserting a search form into the navbar, right after the <ul> containing the dropdown list, insert the following code.
Bootstrap navbar is responsive by default. In a mobile viewport, it displays a slide-down responsive menu. On clicking the menu-expand icon it drops down the menu items. <?php namespace Phppot; use Phppot\DataSource; require_once __DIR__ .
This is new to Bootstrap 3.
The best way to do this would be to remove or comment out lines 52 and 53 in /less/navbar.less: https://github.com/twbs/bootstrap/blob/master/less/navbar.less#L52-53 (you can optionally remove line 59) and recompile bootstrap.less.
If you can't recompile Bootstrap with a tool like CodeKit or Grunt, you'll want to write a media query in your css document that singles out and overwrites the .navbar-collapse class maybe like this:
@media (max-width: 767px) {
.navbar-collapse {
max-height: auto;
overflow-x: auto;
}
}
I haven't actually tested that code above - as I was able to recompile. You may have to include !important or something like that.
This should do it (if you're abiding CSS 3.0 rules)
max-height: none;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With