4
I used the code below to change when the menu button for mobile is displayed and it worked, but the scroll bar does not appear in this size. What can I do to display the scroll bar? If I need to put images.
@media (max-width: 991px) {
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-collapse.collapse.in {
display: block!important;
}
.navbar-nav {
float: none!important;
margin: 7.5px -15px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
}
UPDATED:
Fiddle: https://jsfiddle.net/c80tn7qh/1/
Imagery:
I don’t know how you are
navbar
, but try to put in the.navbar-header
oneoverflow: auto
oroverflow: visible
.– Diego Souza
I did the test, it didn’t work. I’ll put the navbar code and the prints. Thanks!
– Fernando Zabin
You can ride a Fiddle ?
– Diego Souza
Yes. Fiddle: https://jsfiddle.net/c80tn7qh/1/
– Fernando Zabin
places the first parent element of the items listed as Absolute, and his father gives you the overflow
– Murilo Melo
I guess I still don’t understand what you need.
– Diego Souza
@Zooboomafoo increases window drop, items bounce out and does not display scrollbar.
– Fernando Zabin
@Murilogambôa looks like it worked, but when the menu finishes loading it disappears and displays all the items. I put
overflow-y: scroll
inDIV
andposition: absolute
in theUL
.– Fernando Zabin
See if this is what you need ? https://jsfiddle.net/c80tn7qh/3/
– Diego Souza
@Zooboomafoo it! Just need to display some items only and display the bar to view others
– Fernando Zabin
So ? https://jsfiddle.net/c80tn7qh/4/
– Diego Souza
It worked out my suggestion ?
– Diego Souza
@Zooboomafoo this, it did! I went for a test and saw that the normal behavior of the navbar is to push the content down (it gets better), I did something that changed that, so I thought I’d use scrollbar. Anyway, it solved the problem, just add
.navbar-header {float: none;}
. Thank you.– Fernando Zabin
I’ll post with the answer.
– Diego Souza