Bootstrap 3: How to set default grid to 960px width?

前端 未结 4 581
刺人心
刺人心 2021-02-02 00:36

I\'m working with Bootstrap 3 and the client wants the website container width to be set to 960px. Do I directly edit the CSS file or what is the best way to do this? I heard so

4条回答
  •  抹茶落季
    2021-02-02 01:01

    Bootstraps gridsystem is FLUID. This means it works in percentages.

    So just set a width to page wrapper, and you are ready to go

    HTML:

    
        

    CSS:

    .page-wrapper {
        width: 960px; /* Your page width */
        margin: 0 auto; /* To center your page within the body */
    }
    

提交回复
热议问题