Javascript/jQuery height calculation
Posted
by danit
on Stack Overflow
See other posts from Stack Overflow
or by danit
Published on 2010-04-27T09:40:13Z
Indexed on
2010/04/27
9:43 UTC
Read the original article
Hit count: 385
JavaScript
|jQuery
Im looking for a way, in javascript, to calculate the size of the browser (px)
then calculate the size of a <div>
taking away 50px
from that full screen size:
E.g.
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 that 750px
and apply it as inline style:
<div style="height: 50px">
<img src="banner.png" />
</div>
<div style="height: x">
This fills the remainder of the page
</div>
© Stack Overflow or respective owner