PDA

View Full Version : How can i make windows auto-resize?


The Reaper
Dec 25, 2003, 09:06 AM
My web page has a fixed width and height (800 by 600 pixels). when you open the page, i want the browser window to resize so that the contents fit the browser window perfectly (Probably using a javascript). does anyone know how to do this?

i know of a small javascript that can resize the entire window, status bar and all, to a specified size - i don't want this. you know how there is a 'content space' in every browser window? the white space ou get on a blank page? well, i want the window to automatically resize to fit THOSE dimensions, i don't care about the dimensions of the rest of the window, so long as they perfectly accomodate my content.

everyone has their browser window configured differently - some people have a favorites bar, some don't etc. i want the javascript to measure what's outside the content area of the browser window (such as the status bar, favorites bar, history bar etc), add this data to the dimensions of my web page, and size the window accordingly.

anyone up to it?

mnkeybsness
Dec 26, 2003, 12:05 AM
the best way to do this is to write your page so that it is either

A: centered within the window

or

B: dynamically scale the content using tables with percent widths

the preferred method would be method A, as it will keep all of your contents tight and exactly how you want them to look. Alos it can be done using a little CSS, like my site (http://www.paularms.com)