Bootstrap 3 - Set Container Width to 940px Maximum for Desktops?

后端 未结 5 1858
情歌与酒
情歌与酒 2020-12-13 02:26

I am adding a whole new section to a website using Twitter Bootstrap 3, however the container cannot go wider than 940px in total for Desktop - as it will throw out the Head

5条回答
  •  一整个雨季
    2020-12-13 03:23

    The best option is to use the original LESS version of bootstrap (get it from github).

    Open variables.less and look for // Media queries breakpoints

    Find this code and change the breakpoint value:

    // Large screen / wide desktop
    @screen-lg:                  1200px; // change this
    @screen-lg-desktop:          @screen-lg;
    

    Change it to 9999px for example, and this will prevent the breakpoint to be reached, so your site will always load the previous media query which has 940px container

提交回复
热议问题