Reputation: 14290
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?
Upvotes: 1
Views: 203
Reputation: 4649
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#
Upvotes: 1