Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Use Bootstrap Nested Column Grid

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 systemBootStrap 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;
}
like image 346
mod geek Avatar asked Feb 08 '26 02:02

mod geek


2 Answers

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

like image 119
Anoop John Avatar answered Feb 09 '26 16:02

Anoop John


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:

  • For my answer: 1,2,4,3
  • For @john's answer: 1,2,3,4
like image 39
Can Guney Aksakalli Avatar answered Feb 09 '26 16:02

Can Guney Aksakalli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!