I've searched and can't figure out how to make the contents inside a flexbox panel equalheight. I have the panel itself equal height, but I'd also like the panel-heading and panel-body to be equal height also. I've played around for hours hoping I'd stumble on a solution. In summary I'd like equal height panel (already got) with equal height panel-heading and equal height panel-body.
<div class="container">
<div class="row">
<div class="flex-equalheight">
<div class="col-md-3 col-sm-4 col-xs-12 equal">
<div class="panel panel-yellow bells-shadow" style="text-align: center;">
<div class="panel-heading">Line 1</div>
<p class="panel-body panel-statement">understand your company's website goals<br>understand your company's website goals<br>understand your company's website goals</p>
</div>
</div>
<div class="col-md-3 col-sm-4 col-xs-12 equal">
<div class="panel panel-yellow bells-shadow" style="text-align: center;">
<div class="panel-heading">Line 1<br>Line 2</div>
<p class="panel-body panel-statement">benchmark you agains your competition</p>
</div>
</div>
</div>
/* START THE EQUAL HEIGHT FLEX MAGIC */
.flex-equalheight, .equal {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
flex: 1 1 0px;
margin-bottom: 15px;
}
.flex-equalheight .panel {
min-width:100%;
}
I have a codepen that demonstrates the problem . Cheers for any help you can give me.
[EDIT] I've tried adding the following to the codepen with limited success, it seems to work, but then when you resize the browser the content overflows the div for some reason
.panel {
display: flex;
flex-direction:column;
height:100%;
}
.panel-heading, .panel-body {
height:100%;
display:inline-flex;
}