I am looking for a way, in javascript, to calculate the size of the browser (px) and then calculate the size of the <div> by removing 50px from this full-screen size:
eg.
Browser screen size: 800px (Height) Existing <div> that is always 50px (Height) Leaves 750px (Height) for the remaining <div> to fill the page.
Then take 750px and apply it as an inline style:
<div style="height: 50px"> <img src="banner.png" /> </div> <div style="height: x"> This fills the remainder of the page </div>
source share