html - Center divs under eachother -
http://jsfiddle.net/jzlw4/702/
i want center divs under eachother, in example there bigger empty space between left , center, center , right. accomplishable?
something (made in mspaint):
-
bootstrap make things easy:
<div class="col-md-4"> <!--first column--> <div class="pull-right">some content </div> <div class="pull-right">some content </div> </div> <div class="col-md-4"> <!--second column--> <div class="center">some content </div> <div class="center">some content </div> </div> <div class="col-md-4"> <!--first column--> <div class="pull-left">some content </div> <div class="pull-left">some content </div> </div>
css centering div in div:
.center{ width: 50%; /*or every other width...*/ margin: 0 auto; }
if don't want use bootstrap, can columns , floating this:
.col-md-4{ float:left; width:300px /*or whatever width want*/ } .pull-left{ float: left; } .pull-right{ float: right; }
Comments
Post a Comment