html - How to set child div 100% height of the parent (Foundation 6)? -


there 3 33% divs next eachother. 1st empty div, 2nd div containing 4 images, , 3rd empty div.

how responsively keep these 3 blocks same height? i'm using foundation 6.

enter image description here

.block {    background: grey;  }    .block, .imgblock {      height: 200px;  }    .imgblock .row .column{    padding: 0;  }
<link href="https://cdn.jsdelivr.net/foundation/6.2.0/foundation.min.css" rel="stylesheet"/>  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>  <script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/foundation.min.js"></script>    <div class="row small-up-3">    <div class="column block">    </div>    <div class="column imgblock">      <div class="row small-up-2">        <div class="column">          <img src="http://placekitten.com/200/150"/>        </div>        <div class="column">          <img src="http://placekitten.com/200/150"/>        </div>        <div class="column">          <img src="http://placekitten.com/200/150"/>        </div>        <div class="column">          <img src="http://placekitten.com/200/150"/>        </div>      </div>    </div>    <div class="column block">    </div>      </div>

use foundation equalizer js. here code using foundation equalizer:

code:

$(document).foundation();
.block {    background: grey;  }  .block,  .imgblock {    height: 200px;  }  .imgblock .row .column {    padding: 0;  }
<link href="https://cdn.jsdelivr.net/foundation/6.2.0/foundation.min.css" rel="stylesheet" />  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>  <script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/foundation.min.js"></script>  <script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/plugins/foundation.equalizer.js"></script>  <div class="row small-up-3" data-equalizer>    <div class="column block" data-equalizer-watch>    </div>    <div class="column imgblock" data-equalizer-watch>      <div class="row small-up-2">        <div class="column">          <img src="http://placekitten.com/200/150" />        </div>        <div class="column">          <img src="http://placekitten.com/200/150" />        </div>        <div class="column">          <img src="http://placekitten.com/200/150" />        </div>        <div class="column">          <img src="http://placekitten.com/200/150" />        </div>      </div>    </div>    <div class="column block" data-equalizer-watch>    </div>    </div>


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -