Jump to content

Dynamically scale div according to user window resize?


Recommended Posts



I'm a total amateur trying to figure out how to resize a div to a set percentage of the users browser - regardless of how they resize it. And I want to do it dynamically (in that it resizes as the user resizes their browser).


So far then...


I'm using the setMovie function to embed a quicktime called when clicking on a thumbnail using onClick, as in:




The code I'm using to embed is:



(Part of the preceding code I intend to wrangle into showing a title of what's playing, I hope)


It's based on the Prototype framework with the prototype script referenced at the bottom of the doc:


Link to comment
Share on other sites

Thanks, LSW... the problem is that the quicktime file either has a set height and width already, or is set to scale to it's container. Since the container div is not contained within a set dimension, the '100%' value doesn't mean much unless I can make it some %age of the users browser window height/width, right?


I have a code snippet:



But I can't get it to work.....


btw.. I'll probably get around to an iPhone redirect site at some point since it requires .m4v Quicktimes anyway.

Edited by piers
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...