1

I am trying to center my divs with bootstrap

html

 <div id="wrapper" class="container-fluid row">
        <div id="left" class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            //stuff
        </div>
        <div id="right" class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
            //stuff
        </div>
    </div>

it shows

 ----------------------------
|                            |
||left  | |       right      |
||      | |                  |
||      | |                  |
|
|

I want to have

 ----------------------------
|
|     |left|  |  right  |
|     |    |  |         | 
|
|

with Left and Right divs centered within wrapper all the time.

What is the best way to do this with bootstrap class only?

BENARD Patrick
  • 30,363
  • 16
  • 99
  • 105
FlyingCat
  • 14,036
  • 36
  • 119
  • 198

1 Answers1

1

like this by using offset

 <div class="container-fluid">
  <div class="row">
    <div class="col-md-offset-4 col-md-4">this div</div>
    <div class="col-md-3">the other div</div>
</div>
</div>

http://www.bootply.com/m4mREVEntv#

nolawi
  • 4,439
  • 6
  • 22
  • 45