Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter Bootstrap Navbar menu scrolling

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.

like image 551
DevC Avatar asked Aug 31 '13 20:08

DevC


People also ask

How to create a navbar scrolling with the page in Bootstrap?

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>.

What is sticky navbar in Bootstrap?

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.

How to create a Twitter Bootstrap dropdown list with navigation?

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.

How to make bootstrap navbar responsive in Mobile viewport?

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__ .


2 Answers

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.

like image 160
JulienMelissas Avatar answered Nov 15 '22 18:11

JulienMelissas


This should do it (if you're abiding CSS 3.0 rules)

 max-height: none;
like image 24
Unbreakable Avatar answered Nov 15 '22 19:11

Unbreakable