I need help centering two divs vertically in a fixed width/height div, where the two div scales in the middle of the parent div. the first child div has a max-height, so it can scales dynamically to an extent. How can I center them so that teal and green divs goes in the middle of blue vertically?
JSFiddle HERE : https://jsfiddle.net/850sdmhj/
.subtext-container {
position: absolute;
width: 180px;
height: 65px;
color: #ffffff;
background-color: blue;
bottom: 0;
}
.color-teal {
max-height: 40px;
overflow: hidden;
background-color: teal;
}
.color-green {
max-height: 13px;
font-size: 9px;
background-color: green;
}
<div class="subtext-container">
<div class="color-teal">teal</div>
<div class="color-green">green</div>
</div>