0

I'm trying to draw a 2x2 grid using bootstrap. My aim is to make a grid which looks similar to this:

Grid

with an onclick event handler on each tile. I'm having trouble setting the height of the tiles though and have something like this so far...

<div class="col-md-4">
  <div class="row">
     <div class ="col-md-2">
         one
      </div>
     <div class ="col-md-2">
        two
     </div>
  </div>
  <div class="row">
     <div class ="col-md-2">
         three
      </div>
     <div class ="col-md-2">
        four
     </div>
  </div>

f_olivere
  • 93
  • 1
  • 4
  • 17

1 Answers1

2

bootstrap columns should total to 12. The code:

<div>
  <div class="row">
    <div class="col-md-6"></div>
    <div class="col-md-6"></div>
  </div>
  <div class="row">
    <div class="col-md-6"></div>
    <div class="col-md-6"></div>
  </div>
</div>
jmag
  • 796
  • 1
  • 8
  • 17