Resize div on browser resize
- by danit
I have a <div> which I want to display full screen, but I also need to incorporate a 60px high <div> and a 10px high <div> at the top of the document. The size of the main div will need to re-size as the browser window is re-sized to keep it full screen.
<div id="div1" style="height: 60px">
</div>
<div id="div2" style="height: 10px">
</div>
<div id="fullscreen">
</div>
So:
fullscreen height = document size - (#div1 + #div2)
On re-size recalculate the above value.