I want my 3 div boxes, added together, to fill the viewport size. Two of the div boxes (#top and #bottom) have a fixed height. I want it so that the #body div automatically adjust it's height so that the sum of the three divs = viewport size.
#divtop + #divbody + #divbottom = viewport.
<style>
html, body{height:100%; padding:0px;}
#divwrapper{height:100%;}
#divtop{height:300px;}
#divbody{}
#divbottom{height:20px;};
<html><body>
<div id="divwrapper">
<div id="divtop">top
</div>
<div id="divbody"> body
</div>
<div id="divbottom"> bottom
</div>
</div>
</body></html>
The problem is that #divbody automatically renders as a bloc with a default height, and does not automatically adjust it's height so that the three div boxes, together, takes up viewport height.
Thank you.