Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap DropDown Menu: Remove Scrollbar

I'm working in following GitHub-Repo.

When the window width decreases,the navbar collapses and changes to a dropdown menu with scrollbars (for width and heigth).

How can I remove those scrollbars?

I tried adding

.navbar-collapse{
max-height:auto;
max-widht:auto;
}

to my css file which handles the collapsing size.

like image 522
HaeNaatch Avatar asked Jul 08 '15 11:07

HaeNaatch


People also ask

How to disable scrollbar css?

To hide the scrollbar and disable scrolling, we can use the CSS overflow property. This property determines what to do with content that extends beyond the boundaries of its container. To prevent scrolling with this property, just apply the rule overflow: hidden to the body (for the entire page) or a container element.

How do I make a dropdown list scroll?

Hi, You can scroll a dropdown list up and down using the mouse scroll wheel. But to be able to use this option, you have to hover the mouse over the scroll bar instead of the list items.


2 Answers

Another solution is adding the following to your CSS:

/* No scrolling for collapsed menu */

.navbar-collapse.in {
    overflow: hidden;
    max-height: none !important;
    height: auto !important;
}
like image 74
Cristi Draghici Avatar answered Sep 23 '22 00:09

Cristi Draghici


Change your css to

.navbar-collapse.in {
overflow: hidden;
}

Demo

like image 29
Izzy Avatar answered Sep 19 '22 00:09

Izzy