I am looking for a way to ensure that the subfooter div stays at the bottom of the childbox div, similar to a footer. You can view the code on this jsfiddle link
<div class="parentbox">
<div class="childbox">
<div id="subfooter">
keep on bottom of box
</div>
</div>
</div>
<style>
.parentbox {
width:500px;
height:400px;
border-style:solid;
text-align: center;
}
.parentbox:before {
content: ' ';
display: inline-block;
vertical-align: middle;
height: 100%;
}
.childbox {
display: inline-block;
vertical-align: middle;
padding: 5px;
border: 2px solid black;
height:40%
}
</style>
Additionally, I need to ensure that the text 'keep on bottom of box' is vertically aligned.