Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

The Reaper

macrumors member
Original poster
Apr 17, 2003
77
0
Brisbane, Australia
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

macrumors 68030
Jun 25, 2001
2,511
0
Moneyapolis, Minnesota
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.