Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter bootstrap: Is it possible to center container-fluid with two rows with span5 or span4?

I have something like this enter image description here

I have these in a row-fluid with span6. However, I when I do span5 on both of them, they float off the left side, leaving a lot of white space on right free. Can I center them on page ?

like image 680
devcoder Avatar asked Aug 01 '12 21:08

devcoder


1 Answers

Because .offset classes don't work in Bootstrap v2.0.4, you can use .span1 classes to create empty space on left and on right side around those two elements. Like this:

<div class="row-fluid">
  <div class="span1">
    <!-- empty -->
  </div>
  <div class="span5">
    <!-- content of left element (tree map) -->
  </div>
  <div class="span5">
    <!-- content of right element (datatables) -->
  </div>
  <div class="span1">
    <!-- empty -->
  </div>
</div>
like image 200
Miljan Puzović Avatar answered Oct 20 '22 17:10

Miljan Puzović