Resize all elements on a screen upon window resize in javascript or jquery

I am trying to resize all elements on a web page upon resizing the window. The background image needs to stretch along with draggable items, text boxes, font size, and other images. The draggable items needs to stay in the same place in proportion to the background image. Everything needs to maintain aspect ratio. I have tried numerous methods and none seem to work.

04-05-2012, 07:40 PM

Angry Black Man

first:

background images cannot be stretched unelss you use CSS3. CSS3 hasn't been ratified yet, so you may or may not get the desired result across all browsers (especially older browser versions)

second:

doing this in javascript anyway would be math intensive. you'd have to start with obtaining the size of the window. this isn't uniform across all browsers: