Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a 16 column responsive layout with Twitter Bootstrap 2?

I'm getting mixed signals from various forum posts. Does it exist natively by changing:

// Default 940px grid
// -------------------------
@gridColumns:             12;
@gridColumnWidth:         60px;
@gridGutterWidth:         20px;
@gridRowWidth:            (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));

to

// Default 940px grid
// -------------------------
@gridColumns:             16;
@gridColumnWidth:         40px;
@gridGutterWidth:         10px;
@gridRowWidth:            (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));

Is that all I need to do to create a 16 column layout? I've seen some forum posts saying that you have to go hard-code in selectors span11-16 for it to work because those no longer exist since Bootstrap 2.0 and can't be dynamically created.

like image 236
MALON Avatar asked Oct 09 '22 01:10

MALON


1 Answers

Well I just tried and it generates 16 columns fine. Have you looked at this page and tried customizing your download?

http://twitter.github.com/bootstrap/download.html

Also, if you take a look at line 556 of the mixins (The Grid), you'll see the function that generates the spans. It takes the total column count into account when generating the spans.

https://github.com/twitter/bootstrap/blob/master/less/mixins.less

In other words, you're good to go.

like image 90
Mike Robinson Avatar answered Oct 12 '22 00:10

Mike Robinson