html - how to parallel increase two div height if they are in one container -


this question has answer here:

how make both div heights equal css. want see side side these both divs.

<div>how make 2 div heights equal css.how make 2 div heights equal css.</div> 

or

<div>how make 2 div heights equal css. how make 2 div heights equal css. how make 2 div heights equal css. how make 2 div heights equal css. how make 2 div heights equal css.</div> 

assuming have divs side side, can use:

display:flex 

your html is:

<div class="row">   <div class="col">how make 2 div heights equal css.how make 2 div heights equal css.</div>    <div class="col">how make 2 div heights equal css.how make 2 div heights equal css.how make 2 div heights equal css.how make 2 div heights equal css.how make 2 div heights equal css.</div> </div> 

the css be:

.row {     display: flex; /* equal height of children */ }  .col{     border: 1px solid black;     flex:1; // use if want width equal  } 

see fiddle: http://jsfiddle.net/9qzzu1c7/


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -