How can I change a grid of 3x2 to 2x3 without having an empty space where one row ends and another starts?
For example:
<div class="row">
<div class="col-md-4 col-sm-6">
content
</div>
<div class="col-md-4 col-sm-6">
content
</div>
<div class="col-md-4 col-sm-6">
content
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-6">
content
</div>
<div class="col-md-4 col-sm-6">
content
</div>
<div class="col-md-4 col-sm-6">
content
</div>
</div>
This is what I want to achieve:
This:
To this:
But instead I get this:
Just put it all in one row - it'll wrap down automatically.
<div class="row">
<div class="col-md-4 col-sm-6">
content 1
</div>
<div class="col-md-4 col-sm-6">
content 2
</div>
<div class="col-md-4 col-sm-6">
content 3
</div>
<div class="col-md-4 col-sm-6">
content 4
</div>
<div class="col-md-4 col-sm-6">
content 5
</div>
<div class="col-md-4 col-sm-6">
content 6
</div>
</div>
JSFiddle
Put them all in one row. See this bootply
Like:
<div class="row">
<div class="col-md-4 col-sm-6">
<span class="box">content</span>
</div>
<div class="col-md-4 col-sm-6">
<span class="box">content</span>
</div>
<div class="col-md-4 col-sm-6">
<span class="box">content</span>
</div>
<div class="col-md-4 col-sm-6">
<span class="box">content</span>
</div>
<div class="col-md-4 col-sm-6">
<span class="box">content</span>
</div>
<div class="col-md-4 col-sm-6">
<span class="box">content</span>
</div>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With