Struggling to achieve a fluid height modal that fills its parent container without any overflow issues. The parent object is set at 70% height and I want the content inside to span 100% of this height. Any assistance or suggestions would be greatly appreciated. Below is the code snippet along with a jsfiddle link:
CSS
html {
height: 100%;
min-height: 100%;
}
body {
height: 100%;
}
.modal {
position: fixed;
top: 15%;
left: 5%;
width: 90%;
height: 70%;
background: #b10000;
display: block;
.modalWrapper {
position: relative;
height: 100%;
.modalHeader {
width: 100%;
height: 45px;
background: blue;
display: block;
}
.modalSubheader {
width: 100%;
height: 25px;
background: #007755;
display: block;
}
.modalBody {
overflow-y: scroll;
}
.modalFooter {
height: 45px;
width: 100%;
background: cyan;
bottom: 0;
display: block;
position: absolute;
}
}
}
HTML
<div class="modal">
<div class="modalWrapper">
<div class="modalHeader">Turkey</div>
<div class="modalSubheader">Chicken</div>
<div class="modalBody">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse ci...
<div class="modalFooter"></div>
</div>