How to center div with col-md-6?
Bootstrap 3
Add the col-md-offset-3
class that will offset by 3 columns, given that Bootstrap has a 12-column grid this will put a col-md-6
element right in the center.
Documentation reference on offsets.
Bootstrap 4
Use offset-3
or mx-auto
to center a col-md-6
column
Just add "float:none;margin:auto;" to your div style like this :
<div class="col-lg-6" style="float:none;margin:auto;">
.....
</div>
Hope to be useful ;)