I got some mixed concepts right here. What Im trying to achieve is, in a set of bootstrap containers, combine flexbox with bootstrap columns and make the last images ("img-team") resize according to his containers. They are resizing according to width but not to height. When is height what exceed the container just get bigger. What´s happening in the HTML is that one big container set the height property. Then in the subdivs, the space is dividing up according to flex-grow:1 or not flex:0.
DRAW OF PRETENDED
I want the image to adapt that div, not to change the height of the big orange container. Its currently working but not with height increment, just for width increment.
HTML
.img-team {
overflow: hidden;
height: 100%;
width: 100%;
}
<div class="container-fluid" style="display:flex; flex-flow: column; flex: 0 0 50vh">
<div class="container-fluid" style="display:flex; flex-flow: column; flex-grow: 1">
<div>
<h4 class="">TITLE</h4>
</div>
<div class="row" style="display:flex; flex-grow: 1">
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="display:flex; flex-grow: 1; flex-flow: column">
<div style="display:flex; flex-grow: 1; flex-shrink: 1; flex-basis: 0">
<img class="img-team" src="img/team-1.jpg" href=""></img>
</div>
<div>
<h4 class="xxx">Walter White</h4>
<h4 class="xxx">More text</h4>
</div>
</div>
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="display:flex; flex-grow: 1; flex-flow: column">
<div style="display:flex; flex-grow: 1">
<img class="img-team" src="" href=""></img>
</div>
<div>
<h4 class="xxx">Walter White</h4>
<h4 class="xxx">More text</h4>
</div>
</div>
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="display:flex; flex-grow: 1; flex-flow: column">
<div style="display:flex; flex-grow: 1">
<img class="img-team" src="" href=""></img>
</div>
<div>
<h4 class="xxx">Walter White</h4>
<h4 class="xxx">More text</h4>
</div>
</div>
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="display:flex; flex-grow: 1; flex-flow: column">
<div style="display:flex; flex-grow: 1">
<img class="img-team" src="" href=""></img>
</div>
<div>
<h4 class="xxx">Walter White</h4>
<h4 class="xxx">More text</h4>
</div>
</div>
</div>
</div>
</div>

