Twitter bootstrap - change default width

I just started twitter twitter bootstrap and wanted to know what is the best approach to change the default width from 940px to 864px. I tried using the settings page to change the @gridColumnWidth variable to 50 pixels. which should make the total width of 820px, but the default width is just adjusted to 1170px after loading. Should I just leave the default value at 940px and embed a div with a width of 864px inside div.row> .span12?

I also tried using fewer files, but when I try to compile them as css files, I get errors that say the classes, id and variables are undefined.

Thanks for any help

Jason

+4
source share
2 answers

It works great for me using the customize page .

Be sure to change @gridColumnWidth , @gridColumnWidth1200 and @gridColumnWidth768 (and optionally @gridGutterWidth* ).
The width of 1170 pixels that you see corresponds to @gridColumnWidth1200 .

+8
source

You can override the default styles by placing another CSS file with the same selectors and the desired formatting after bootstrap.css . If you wish, you can also use selectors with more specificity, and then the order of the files will be irrelevant. The use of !important should be the last, as this complicates further use.

+1
source

Source: https://habr.com/ru/post/1442816/


All Articles