3

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;
}

3 Answers 3

6

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

Sign up to request clarification or add additional context in comments.

Comments

2

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

Comments

1

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.