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
  • 102,164
  • 10
  • 117
  • 144
Schneider
  • 2,306
  • 6
  • 27
  • 37

3 Answers3

6

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

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

Here you will find your answer:

get div height after div content load

And an example you can find at the next link:

http://fiddle.jshell.net/stryd3r/MgnT8/

Community
  • 1
  • 1
Aditzu
  • 706
  • 1
  • 13
  • 24
-1

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

Sean Keane
  • 452
  • 1
  • 6
  • 16
  • 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