For filling available space in parent div just use this
.parent
{
position: relative;
}
.child
{
position: absolute;
bottom: 0;
top: 40px; /* can set accordingly"*/
}
So try this code
<div class="parent">
<div class="fixedChild"></div>
<div class="dynamicChild">ss</div>
</div>
CSS :
body,html
{
height:100%;
}
.parent
{
height:100%;
min-height:100%;
background-color:Black;
position: relative;
}
.fixedChild
{
height:40px;
background-color:Green;
}
.dynamicChild
{
background-color:Red;
position: absolute;
top: 40px;
bottom: 0;
width:100%;
}
here is JS Fiddle demo