0

Is is possible to have child div same height as parent in bootsrtap 3?

Here is example

    <div class="row clearfix">
        <div class="col-md-6" style="background-color:red;">

 VERY LONG TEXT, JUST LONER< AND LONGER, AND LONGER, AND LONGER 
        </div>
        <div class="col-md-6" style="background-color:green;">

SHORT TXT
        </div>
    </div>

I want right col to be the same height as left column is that possible on easy way?

Paulie_D
  • 107,962
  • 13
  • 142
  • 161
Schneider
  • 2,446
  • 6
  • 28
  • 38

2 Answers2

6

here is the result: http://jsfiddle.net/kaAjW/2316/

.row {overflow: hidden;}
.col-md-6 {
    padding-bottom: 1000px;
    margin-bottom: -1000px;
    }
Cristina Cristea
  • 566
  • 1
  • 3
  • 11
-1

Yes, just set a height on both the divs style="height: 100px;"

Sean Keane
  • 411
  • 1
  • 6
  • 19
  • If you set only min-height is not necessary both divs to be equal. For example you set min-height:200px; but the div on the left can have 300px and the one from the right can have 300px. – Aditzu Jan 31 '14 at 07:45
  • this solutions is not ideal for a responsive design. – scottydelta Sep 29 '16 at 00:38