Bootstrap - How to set column height to more than one rows?










0















I have a bootstrap image grid I need to create for desktop, you can see the layout below.



Proposed grid layout



The problem I'm having is the center box goes over two rows so I can't figure out how to implement it. Might be a newbie question but any help is much appreciated!










share|improve this question



















  • 1





    How about you make the center box go in one row, and the outer boxes also go in that same one row, but you just put two boxes in one row.

    – Nick Parsons
    Nov 13 '18 at 11:09
















0















I have a bootstrap image grid I need to create for desktop, you can see the layout below.



Proposed grid layout



The problem I'm having is the center box goes over two rows so I can't figure out how to implement it. Might be a newbie question but any help is much appreciated!










share|improve this question



















  • 1





    How about you make the center box go in one row, and the outer boxes also go in that same one row, but you just put two boxes in one row.

    – Nick Parsons
    Nov 13 '18 at 11:09














0












0








0








I have a bootstrap image grid I need to create for desktop, you can see the layout below.



Proposed grid layout



The problem I'm having is the center box goes over two rows so I can't figure out how to implement it. Might be a newbie question but any help is much appreciated!










share|improve this question
















I have a bootstrap image grid I need to create for desktop, you can see the layout below.



Proposed grid layout



The problem I'm having is the center box goes over two rows so I can't figure out how to implement it. Might be a newbie question but any help is much appreciated!







html css twitter-bootstrap twitter-bootstrap-3 responsive-design






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 17:42









itdoesntwork

722519




722519










asked Nov 13 '18 at 11:06









AidanAidan

2302613




2302613







  • 1





    How about you make the center box go in one row, and the outer boxes also go in that same one row, but you just put two boxes in one row.

    – Nick Parsons
    Nov 13 '18 at 11:09













  • 1





    How about you make the center box go in one row, and the outer boxes also go in that same one row, but you just put two boxes in one row.

    – Nick Parsons
    Nov 13 '18 at 11:09








1




1





How about you make the center box go in one row, and the outer boxes also go in that same one row, but you just put two boxes in one row.

– Nick Parsons
Nov 13 '18 at 11:09






How about you make the center box go in one row, and the outer boxes also go in that same one row, but you just put two boxes in one row.

– Nick Parsons
Nov 13 '18 at 11:09













3 Answers
3






active

oldest

votes


















3














Something like this should do..



<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-md-4">
<div class="row">
<div class="col-md-12">
<div class="well">1</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="well">2</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="well">3
<br>
<br>
<br>
<br>
<br>
</div>
</div>
<div class="col-md-4">
<div class="row">
<div class="col-md-12">
<div class="well">4</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="well">5</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="well">6</div>
</div>
<div class="col-md-6">
<div class="well">7</div>
</div>
</div>





share|improve this answer


















  • 1





    Thanks that worked perfectly! didn't know you could nest rows and columns

    – Aidan
    Nov 13 '18 at 13:00


















0














Grid has 12 column. Grid may overlap if the sum of total grid in your row is bigger than 12. you can put all content in a row then divide them on 3.Make first and third one 2 rows and make middle one your center row.



It will be easier to understand if you share your code.






share|improve this answer
































    0














    You can achieve this by putting your large box in one row, and the outer small boxes in the same row, where the two smaller boxes are just two boxes in the one row. (Both of height 50%).



    Take a look at the snippet below for a working example:






    .box 
    height: 100%;
    width: 100%;
    background-color: lightgrey;


    .box-container
    width: 100%;
    height: 50%;
    padding: 2px;


    .big-box
    height: 200px;
    background-color: lightgrey;


    .col-3, .col-6
    padding: 0 !important;

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    <div class="container">
    <div class="row">
    <div class="col-3">
    <div class="box-container"><div class="box"></div></div>
    <div class="box-container"><div class="box"></div></div>
    </div>

    <div class="col-6">
    <div class="big-box"></div>
    </div>

    <div class="col-3">
    <div class="box-container"><div class="box"></div></div>
    <div class="box-container"><div class="box"></div></div>
    </div>
    </div>

    </div>





    Note: I have use col-3 and col-6 for the fiddle to fit to the sample window, however, if you want responsiveness, you can use col-md-3 and col-md-6 (or sm instead of md if you wish for it to collapse at a smaller size).






    share|improve this answer






















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53279658%2fbootstrap-how-to-set-column-height-to-more-than-one-rows%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      Something like this should do..



      <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
      <div class="row">
      <div class="col-md-4">
      <div class="row">
      <div class="col-md-12">
      <div class="well">1</div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-12">
      <div class="well">2</div>
      </div>
      </div>
      </div>
      <div class="col-md-4">
      <div class="well">3
      <br>
      <br>
      <br>
      <br>
      <br>
      </div>
      </div>
      <div class="col-md-4">
      <div class="row">
      <div class="col-md-12">
      <div class="well">4</div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-12">
      <div class="well">5</div>
      </div>
      </div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-6">
      <div class="well">6</div>
      </div>
      <div class="col-md-6">
      <div class="well">7</div>
      </div>
      </div>





      share|improve this answer


















      • 1





        Thanks that worked perfectly! didn't know you could nest rows and columns

        – Aidan
        Nov 13 '18 at 13:00















      3














      Something like this should do..



      <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
      <div class="row">
      <div class="col-md-4">
      <div class="row">
      <div class="col-md-12">
      <div class="well">1</div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-12">
      <div class="well">2</div>
      </div>
      </div>
      </div>
      <div class="col-md-4">
      <div class="well">3
      <br>
      <br>
      <br>
      <br>
      <br>
      </div>
      </div>
      <div class="col-md-4">
      <div class="row">
      <div class="col-md-12">
      <div class="well">4</div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-12">
      <div class="well">5</div>
      </div>
      </div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-6">
      <div class="well">6</div>
      </div>
      <div class="col-md-6">
      <div class="well">7</div>
      </div>
      </div>





      share|improve this answer


















      • 1





        Thanks that worked perfectly! didn't know you could nest rows and columns

        – Aidan
        Nov 13 '18 at 13:00













      3












      3








      3







      Something like this should do..



      <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
      <div class="row">
      <div class="col-md-4">
      <div class="row">
      <div class="col-md-12">
      <div class="well">1</div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-12">
      <div class="well">2</div>
      </div>
      </div>
      </div>
      <div class="col-md-4">
      <div class="well">3
      <br>
      <br>
      <br>
      <br>
      <br>
      </div>
      </div>
      <div class="col-md-4">
      <div class="row">
      <div class="col-md-12">
      <div class="well">4</div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-12">
      <div class="well">5</div>
      </div>
      </div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-6">
      <div class="well">6</div>
      </div>
      <div class="col-md-6">
      <div class="well">7</div>
      </div>
      </div>





      share|improve this answer













      Something like this should do..



      <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
      <div class="row">
      <div class="col-md-4">
      <div class="row">
      <div class="col-md-12">
      <div class="well">1</div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-12">
      <div class="well">2</div>
      </div>
      </div>
      </div>
      <div class="col-md-4">
      <div class="well">3
      <br>
      <br>
      <br>
      <br>
      <br>
      </div>
      </div>
      <div class="col-md-4">
      <div class="row">
      <div class="col-md-12">
      <div class="well">4</div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-12">
      <div class="well">5</div>
      </div>
      </div>
      </div>
      </div>
      <div class="row">
      <div class="col-md-6">
      <div class="well">6</div>
      </div>
      <div class="col-md-6">
      <div class="well">7</div>
      </div>
      </div>






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 13 '18 at 11:19









      itdoesntworkitdoesntwork

      722519




      722519







      • 1





        Thanks that worked perfectly! didn't know you could nest rows and columns

        – Aidan
        Nov 13 '18 at 13:00












      • 1





        Thanks that worked perfectly! didn't know you could nest rows and columns

        – Aidan
        Nov 13 '18 at 13:00







      1




      1





      Thanks that worked perfectly! didn't know you could nest rows and columns

      – Aidan
      Nov 13 '18 at 13:00





      Thanks that worked perfectly! didn't know you could nest rows and columns

      – Aidan
      Nov 13 '18 at 13:00













      0














      Grid has 12 column. Grid may overlap if the sum of total grid in your row is bigger than 12. you can put all content in a row then divide them on 3.Make first and third one 2 rows and make middle one your center row.



      It will be easier to understand if you share your code.






      share|improve this answer





























        0














        Grid has 12 column. Grid may overlap if the sum of total grid in your row is bigger than 12. you can put all content in a row then divide them on 3.Make first and third one 2 rows and make middle one your center row.



        It will be easier to understand if you share your code.






        share|improve this answer



























          0












          0








          0







          Grid has 12 column. Grid may overlap if the sum of total grid in your row is bigger than 12. you can put all content in a row then divide them on 3.Make first and third one 2 rows and make middle one your center row.



          It will be easier to understand if you share your code.






          share|improve this answer















          Grid has 12 column. Grid may overlap if the sum of total grid in your row is bigger than 12. you can put all content in a row then divide them on 3.Make first and third one 2 rows and make middle one your center row.



          It will be easier to understand if you share your code.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 13 '18 at 11:15

























          answered Nov 13 '18 at 11:10









          Ishtiyak R ShishirIshtiyak R Shishir

          94




          94





















              0














              You can achieve this by putting your large box in one row, and the outer small boxes in the same row, where the two smaller boxes are just two boxes in the one row. (Both of height 50%).



              Take a look at the snippet below for a working example:






              .box 
              height: 100%;
              width: 100%;
              background-color: lightgrey;


              .box-container
              width: 100%;
              height: 50%;
              padding: 2px;


              .big-box
              height: 200px;
              background-color: lightgrey;


              .col-3, .col-6
              padding: 0 !important;

              <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

              <div class="container">
              <div class="row">
              <div class="col-3">
              <div class="box-container"><div class="box"></div></div>
              <div class="box-container"><div class="box"></div></div>
              </div>

              <div class="col-6">
              <div class="big-box"></div>
              </div>

              <div class="col-3">
              <div class="box-container"><div class="box"></div></div>
              <div class="box-container"><div class="box"></div></div>
              </div>
              </div>

              </div>





              Note: I have use col-3 and col-6 for the fiddle to fit to the sample window, however, if you want responsiveness, you can use col-md-3 and col-md-6 (or sm instead of md if you wish for it to collapse at a smaller size).






              share|improve this answer



























                0














                You can achieve this by putting your large box in one row, and the outer small boxes in the same row, where the two smaller boxes are just two boxes in the one row. (Both of height 50%).



                Take a look at the snippet below for a working example:






                .box 
                height: 100%;
                width: 100%;
                background-color: lightgrey;


                .box-container
                width: 100%;
                height: 50%;
                padding: 2px;


                .big-box
                height: 200px;
                background-color: lightgrey;


                .col-3, .col-6
                padding: 0 !important;

                <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

                <div class="container">
                <div class="row">
                <div class="col-3">
                <div class="box-container"><div class="box"></div></div>
                <div class="box-container"><div class="box"></div></div>
                </div>

                <div class="col-6">
                <div class="big-box"></div>
                </div>

                <div class="col-3">
                <div class="box-container"><div class="box"></div></div>
                <div class="box-container"><div class="box"></div></div>
                </div>
                </div>

                </div>





                Note: I have use col-3 and col-6 for the fiddle to fit to the sample window, however, if you want responsiveness, you can use col-md-3 and col-md-6 (or sm instead of md if you wish for it to collapse at a smaller size).






                share|improve this answer

























                  0












                  0








                  0







                  You can achieve this by putting your large box in one row, and the outer small boxes in the same row, where the two smaller boxes are just two boxes in the one row. (Both of height 50%).



                  Take a look at the snippet below for a working example:






                  .box 
                  height: 100%;
                  width: 100%;
                  background-color: lightgrey;


                  .box-container
                  width: 100%;
                  height: 50%;
                  padding: 2px;


                  .big-box
                  height: 200px;
                  background-color: lightgrey;


                  .col-3, .col-6
                  padding: 0 !important;

                  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

                  <div class="container">
                  <div class="row">
                  <div class="col-3">
                  <div class="box-container"><div class="box"></div></div>
                  <div class="box-container"><div class="box"></div></div>
                  </div>

                  <div class="col-6">
                  <div class="big-box"></div>
                  </div>

                  <div class="col-3">
                  <div class="box-container"><div class="box"></div></div>
                  <div class="box-container"><div class="box"></div></div>
                  </div>
                  </div>

                  </div>





                  Note: I have use col-3 and col-6 for the fiddle to fit to the sample window, however, if you want responsiveness, you can use col-md-3 and col-md-6 (or sm instead of md if you wish for it to collapse at a smaller size).






                  share|improve this answer













                  You can achieve this by putting your large box in one row, and the outer small boxes in the same row, where the two smaller boxes are just two boxes in the one row. (Both of height 50%).



                  Take a look at the snippet below for a working example:






                  .box 
                  height: 100%;
                  width: 100%;
                  background-color: lightgrey;


                  .box-container
                  width: 100%;
                  height: 50%;
                  padding: 2px;


                  .big-box
                  height: 200px;
                  background-color: lightgrey;


                  .col-3, .col-6
                  padding: 0 !important;

                  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

                  <div class="container">
                  <div class="row">
                  <div class="col-3">
                  <div class="box-container"><div class="box"></div></div>
                  <div class="box-container"><div class="box"></div></div>
                  </div>

                  <div class="col-6">
                  <div class="big-box"></div>
                  </div>

                  <div class="col-3">
                  <div class="box-container"><div class="box"></div></div>
                  <div class="box-container"><div class="box"></div></div>
                  </div>
                  </div>

                  </div>





                  Note: I have use col-3 and col-6 for the fiddle to fit to the sample window, however, if you want responsiveness, you can use col-md-3 and col-md-6 (or sm instead of md if you wish for it to collapse at a smaller size).






                  .box 
                  height: 100%;
                  width: 100%;
                  background-color: lightgrey;


                  .box-container
                  width: 100%;
                  height: 50%;
                  padding: 2px;


                  .big-box
                  height: 200px;
                  background-color: lightgrey;


                  .col-3, .col-6
                  padding: 0 !important;

                  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

                  <div class="container">
                  <div class="row">
                  <div class="col-3">
                  <div class="box-container"><div class="box"></div></div>
                  <div class="box-container"><div class="box"></div></div>
                  </div>

                  <div class="col-6">
                  <div class="big-box"></div>
                  </div>

                  <div class="col-3">
                  <div class="box-container"><div class="box"></div></div>
                  <div class="box-container"><div class="box"></div></div>
                  </div>
                  </div>

                  </div>





                  .box 
                  height: 100%;
                  width: 100%;
                  background-color: lightgrey;


                  .box-container
                  width: 100%;
                  height: 50%;
                  padding: 2px;


                  .big-box
                  height: 200px;
                  background-color: lightgrey;


                  .col-3, .col-6
                  padding: 0 !important;

                  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

                  <div class="container">
                  <div class="row">
                  <div class="col-3">
                  <div class="box-container"><div class="box"></div></div>
                  <div class="box-container"><div class="box"></div></div>
                  </div>

                  <div class="col-6">
                  <div class="big-box"></div>
                  </div>

                  <div class="col-3">
                  <div class="box-container"><div class="box"></div></div>
                  <div class="box-container"><div class="box"></div></div>
                  </div>
                  </div>

                  </div>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 13 '18 at 11:33









                  Nick ParsonsNick Parsons

                  5,0172721




                  5,0172721



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53279658%2fbootstrap-how-to-set-column-height-to-more-than-one-rows%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      這個網誌中的熱門文章

                      How to read a connectionString WITH PROVIDER in .NET Core?

                      In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

                      Museum of Modern and Contemporary Art of Trento and Rovereto