Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What values I should set in twitter bootstrap for a fixed 960px layout?

I'm using twitter bootstrap with less cloned from github. I want to set grid width variables because I need a 960px fixed layout. Default values for 940px width are:

@gridColumns:             12;
@gridColumnWidth:         60px;
@gridGutterWidth:         20px;

What values I should set for a fixed 960px layout?

I tried with this, but result was 950px:

@gridColumns:             12;
@gridColumnWidth:         70px;
@gridGutterWidth:         10px;
like image 749
smoreno Avatar asked Sep 05 '12 13:09

smoreno


2 Answers

Solve the equation

You need to find a solution(s) for the equasion. One of them is:

@gridColumns:             12;
@gridColumnWidth:         69px;
@gridGutterWidth:         12px;

another one:

@gridColumns:             12;
@gridColumnWidth:         58px;
@gridGutterWidth:         24px;

But use default

Bootstrap was designed for 960px width, it just doesn't specify additional margin/padding on the sides:

| ------------------------------ 960px width ---------------------------------- |
10px left margin | ------------- 940px container ------------ | 10px right margin

So I suggest you to use the default values, if you are targeting 960px.

like image 93
Pavlo Avatar answered Nov 08 '22 02:11

Pavlo


You could always make a 960px container and use fluid.

like image 29
Paul Avatar answered Nov 08 '22 02:11

Paul