I am using Bootstrap v3.
I have the navbar classes in place so that when I have my screen mobile-size the navigation collapses and the little grid-like toggle button
You can use override the default Bootstrap CSS like this...
.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-nav {
float: none!important;
margin: 7.5px -15px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
Demo: http://www.bootply.com/114896
This will ensure that the collapsed navbar is always used by overriding the Bootstrap @media queries.
Update: For Bootstrap 4, you just need to remove the navbar-toggleable
class:
http://www.codeply.com/go/LN6szcJO53
Adding 100% value on @grid-float-breakpoint
(Grid system -> @grid-float-breakpoint
-> 100%
instead of @screen-sm-min
).
Easiest way i found is to change the variable.less file and change
// Navbar collapse
//** Point at which the navbar becomes uncollapsed.
@grid-float-breakpoint: @screen-sm-min;
to
// Navbar collapse
//** Point at which the navbar becomes uncollapsed.
@grid-float-breakpoint: ( your break point );
Only if you use LESS ofc.
This is what worked for me.
Visit : http://getbootstrap.com/customize/
Locate : 'Less variables' --> 'Media queries breakpoints'
Change : @screen-lg value from 1200px to 1920px
Locate : "Grid system" --> @grid-float-breakpoint
Change : @screen-sm-min to @screen-lg
Scroll to end of page.
Click on "Compile and Download"
Extract and use these downloaded files.
This worked for me:
.navbar-collapse.collapse {
display: none!important;
}
If suppose you find problems with toggle too, then put the following:
.navbar-collapse.collapse.in{
display: block!important;
}
Wanted to save time but it wasn't perfect. I got some issues with latest bootstrap, there is some unnecessary code and has a overflow
problem in the drop-down menu. This code was the best solution for me:
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-collapse.collapse.in {
display: block!important;
}
.navbar-nav {
float: none!important;
}
.navbar-nav>li {
float: none;
}