PDA

View Full Version : Resizing to a specified inner width



Nonenone
04-27-2004, 10:33 AM
Hi

I have a document that I'd like to do the following with, can anyone help?

I'd like the window to resize onload to an innerwidth/height of 783px by 434px, so that all browsers will display the same screen space

The content inside is larger than that and I want people to scroll if they have their browser window open larger (sounds strange I know!).

I have used a standard - onLoad="resizeTo(783,434) - but it looks incorrect on netscape etc.

Any ideas?

Thanks

swmr
04-27-2004, 03:11 PM
maybe something like: window.onresize = function(){resizeTo(783,434);}

liorean
04-27-2004, 04:11 PM
You could resize to a certain size, calculate the difference compared to the inner size, and resize again based on the results of that resize.

However, I believe a better choice would be wrapping the body in another element, to which you set those size limits, and let the user scroll that element instead.