You can see more details on http://twitter.github.com/bootstrap/scaffolding.html#gridSystem

Live grid example

The default Bootstrap grid system utilizes 12 columns, making for a 940px wide container without responsive features enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.

1
1
1
1
1
1
1
1
1
1
1
1
2
3
4
3
5
6
1
12

Basic grid HTML

For a simple two column layout, create a .row and add the appropriate number of .span* columns. As this is a 12-column grid, each .span* spans a number of those 12 columns, and should always add up to 12 for each row (or the number of columns in the parent).

<div class="row">
  <div class="span4">...</div>
  <div class="span8">...</div>
</div>

Given this example, we have .span4 and .span8, making for 12 total columns and a complete row.

SHORCODE DEMOS

The shortcode is quite simple Attach the cols number near grid. Keep in mind you must use the row shortcode.

[grid 1/2/3/4/5/6/7/8/9/10/11/12]...[/grid]
[row]
  [grid 2]
    ...
  [/grid]
  [grid 10]
    ...
  [/grid]
[row]

You can also use the grid shortcodes like this:

[grid3 first/last]...[/grid3]
[grid2 first]
    ...
[/grid2]
[grid10 last]
    ...
[/grid10]

Other examples:

[onethird first/last]...[/onethird]

 

[twothirds first/last]...[/twothirds]

 

[half first/last]...[/half]

Offsetting columns

Move columns to the right using .offset* classes. Each class increases the left margin of a column by a whole column. For example, .offset4 moves .span4 over four columns.

4
3 offset 2
2 offset 1
3 offset 1
3 offset 2
1 offset 2
6 offset 3
2 offset 1
<div class="row">
  <div class="span4">...</div>
  <div class="span3 offset2">...</div>
</div>

Nesting columns

To nest your content with the default grid, add a new .row and set of .span* columns within an existing .span* column. Nested rows should include a set of columns that add up to the number of columns of its parent.

Level 1 column
Level 2
Level 2
<div class="row">
  <div class="span9">
    Level 1 column
    <div class="row">
      <div class="span6">Level 2</div>
      <div class="span3">Level 2</div>
    </div>
  </div>
</div>

Live fluid grid example

The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.

1
1
1
1
1
1
1
1
1
1
1
1
4
4
4
4
8
6
6
12

Basic fluid grid HTML

Make any row "fluid" by changing .row to .row-fluid. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.

<div class="row-fluid">
  <div class="span4">...</div>
  <div class="span8">...</div>
</div>

Fluid offsetting

Operates the same way as the fixed grid system offsetting: add .offset* to any column to offset by that many columns.

4
4 offset 4
3 offset 3
3 offset 3
6 offset 6
<div class="row-fluid">
  <div class="span4">...</div>
  <div class="span4 offset2">...</div>
</div>

Fluid nesting

Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.

Fluid 12
Fluid 6
Fluid 6
<div class="row-fluid">
  <div class="span12">
    Fluid 12
    <div class="row-fluid">
      <div class="span6">Fluid 6</div>
      <div class="span6">Fluid 6</div>
    </div>
  </div>
</div>

Get base styles and flexible support for collapsible components like accordions and navigation.

The example above has the class="acc-group default-style", where default-style has the styling.

 

Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.
Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.
Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.

SHORTCODE PARAMS

[acc title="" style="" start_opened="" tweaked=""] ... [/acc]

 

style = default-style / style2 / style3

tweaks = yes / no

start_opened = yes / no

SHORTCODE DEMO

[acc title=" the title here " style="default-style" ] 
  ... content here
[/acc]

Other Styles - style2

Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.
Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.
Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.

Other Styles - style3

Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.
Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.
Vivamus ut molestie nulla. Aenean vel tortor velit. Morbi quis varius tortor. Quisque sit amet leo purus, eget accumsan lorem. Curabitur fringilla ipsum id quam lacinia venenatis.

GET IN TOUCH WITH US

Address: Street Address nr 100, 4536534, Your Town, United States
Phone: (212) 555 55 00 // Email: office@yourwebsite.com // Web: www.yourwebsite.com
Open in Google Maps

Default buttons

Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements for the best rendering.

Button class="" Description
btn Standard gray button with gradient
btn btn-primary Provides extra visual weight and identifies the primary action in a set of buttons
btn btn-info Used as an alternative to the default styles
btn btn-success Indicates a successful or positive action
btn btn-warning Indicates caution should be taken with this action
btn btn-danger Indicates a dangerous or potentially negative action
btn btn-inverse Alternate dark gray button, not tied to a semantic action or use
btn btn-link Deemphasize a button by making it look like a link while maintaining button behavior

Cross browser compatibility

IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.

BUTTONS SHORTCODES

[btn size="" type="" class="" class="" disabled="" link="" target="" icon="" icontheme=""][/btn]

type: primary / info / success / warning / danger / inverse / link / flat

size: primary / large / small / mini

disabled: yes / no

icon: add the icon type without the " icon- "

icontheme: white / black

[btn size="" type="" class="" class="" disabled="" link="" target="" icon="" icontheme=""][/btn]

Button sizes

Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for additional sizes.

<p>
  <button class="btn btn-large btn-primary" type="button">Large button</button>
  <button class="btn btn-large" type="button">Large button</button>
</p>
<p>
  <button class="btn btn-primary" type="button">Default button</button>
  <button class="btn" type="button">Default button</button>
</p>
<p>
  <button class="btn btn-small btn-primary" type="button">Small button</button>
  <button class="btn btn-small" type="button">Small button</button>
</p>
<p>
  <button class="btn btn-mini btn-primary" type="button">Mini button</button>
  <button class="btn btn-mini" type="button">Mini button</button>
</p>

Create block level buttons—those that span the full width of a parent— by adding .btn-block.

<button class="btn btn-large btn-block btn-primary" type="button">Block level button</button>
<button class="btn btn-large btn-block" type="button">Block level button</button>

Disabled state

Make buttons look unclickable by fading them back 50%.

Anchor element

Add the .disabled class to <a> buttons.

Primary link Link

<a href="#" class="btn btn-large btn-primary disabled">Primary link</a>
<a href="#" class="btn btn-large disabled">Link</a>

Heads up! We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. Also, this class is only for aesthetic; you must use custom JavaScript to disable links here.

Button element

Add the disabled attribute to <button> buttons.

<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button>
<button type="button" class="btn btn-large" disabled>Button</button>

One class, multiple tags

Use the .btn class on an <a>, <button>, or <input> element.

Link
<a class="btn" href="/">Link</a>
<button class="btn" type="submit">Button</button>
<input class="btn" type="button" value="Input">
<input class="btn" type="submit" value="Submit">

As a best practice, try to match the element for your context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.

SOCIAL ICONS

<ul class="social-icons fixclear">
	<li class="social-twitter"><a href="#">Twitter</a></li>
	<li class="social-dribbble"><a href="#">Dribbble</a></li>
	<li class="social-facebook"><a href="#">Facebook</a></li>
	...
</ul>

SOCIAL ICONS - Colored

<ul class="social-icons colored fixclear">
	<li class="social-twitter"><a href="#">Twitter</a></li>
	...
</ul>

SOCIAL ICONS - Colored only on :hover

<ul class="social-icons coloredHov fixclear">
	<li class="social-twitter"><a href="#">Twitter</a></li>
	...
</ul>

or Shortcode:

type: normal / colored

[socialicons class="" type="" style="" ]
	[socialicon network="" url="#"]
[/socialicons]

404

The page cannot be found.

TOP