Reputation: 310
I have tried to achieve bootstrap nested column div but this is not responsive I want to achieve the fully responsive grid system In BootStrap
this is what i want to achieve in bootstrap grid system
This is my html markup
<div class="col-md-12 topSpace">
<div class="col-md-3 text-center"></div>
<div class="col-md-6 text-center">
</div>
<div class="col-md-3 text-center">
</div>
</div>
<div class="md-col-6 col-centered"></div>
this is the css markup
.col-centered{
margin:0 auto;
}
.topSpace{
top:100px;
}
Upvotes: 3
Views: 418
Reputation: 464
This below html markup should work.
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
1
</div>
<div class="col-md-6">
2
</div>
<div class="col-md-3">
3
</div>
</div>
<div class="row">
<div class="col-md-6 col-md-offset-3">
4
</div>
</div>
</div>
Demo: http://bootply.com/SJ3EYuxOQM
Upvotes: 6
Reputation: 1330
Another alternative to @John's answer is
<div class="col-md-12">
<div class="col-md-3">
1
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
2
</div>
<div class="col-md-12">
4
</div>
</div>
</div>
<div class="col-md-3">
3
</div>
</div>
It differs how the items are listed for smaller screen width:
Upvotes: 2
Reputation: 1530
This one also work try It,
<form class="form-horizontal" role="form">
<div class="form-group">
<div class="col-md-3">
DIV1
</div>
<div class="col-md-6">
DIV2
</div>
<div class="col-md-3">
DIV3
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
DIV4
</div>
</div>
</form>
Upvotes: 1