Prevent menu from collapsing in 768px display CSS media query

后端 未结 9 1734
[愿得一人]
[愿得一人] 2020-12-08 10:16

I am trying to do a site using twitter bootstrap. I am having relatively less menus, so it kind of fits within the 768px display also. But in bootstrap by default, the menu

相关标签:
9条回答
  • 2020-12-08 11:06

    find variable:

    @grid-float-breakpoint

    which is set to @screen-sm, you can change it according to your needs.

    If you override the vendor less file, set the variable to 0px, eg:

    @grid-float-breakpoint: 0px;

    0 讨论(0)
  • 2020-12-08 11:08

    Reading the answers, I believe you are talking about Bootstrap version 2. Maybe someone looking for an answer for Bootstrap 3 will arrive here. This answer is for you!

    1. Go to Bootstrap customization page
    2. redefine the @grid-float-breakpoint value for something hardcoded (e.g. 520px) or for a smaller screen size like @screen-xs-min
    3. Press the button at the bottom of the page to recompile the css files
    4. substitute your bootstrap.css and bootstrap-min.css files with the ones from the downloaded zip file.
    0 讨论(0)
  • 2020-12-08 11:10

    This worked well for me:

    .nav-collapse, .nav-collapse.collapse {
        overflow: visible;
    }   
    .navbar .btn-navbar {
        display: none;
    }   
    
    0 讨论(0)
提交回复
热议问题