J
JezB
I have a DIV which I want to automatically resize when the user resizes the
browser.
The width setting is easy - I want it to appear on the left hand side of the
page and take up 50% of the screen so I set width:50%.
The height is more tricky since I want to size it from it's rendered
Y-position (which is not 0) down to the bottom of the browser. Hence if the
user resizes downwards the DIV should expand itself to fit the height
available. Since its Y position is not 0, setting height:100% will not work.
So I really need something like height:-30px assuming my div starts at
Y-co-ordinate 30 - but I'm not using absolute positioning so this may vary!
Any suggestions ?
browser.
The width setting is easy - I want it to appear on the left hand side of the
page and take up 50% of the screen so I set width:50%.
The height is more tricky since I want to size it from it's rendered
Y-position (which is not 0) down to the bottom of the browser. Hence if the
user resizes downwards the DIV should expand itself to fit the height
available. Since its Y position is not 0, setting height:100% will not work.
So I really need something like height:-30px assuming my div starts at
Y-co-ordinate 30 - but I'm not using absolute positioning so this may vary!
Any suggestions ?