Discussion Locked

Browser view of web pages

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there code to set a browser to the size view one needs to see the web page properly?

5 replies

by jay eckles

You cannot resize the initial browser screen, but you can launch a new window and size it. Actually, I should say you can attempt to do this because 1. the user may have Javascript turned off - like to prevent pop-ups and pop-unders; 2. the user may not be using a visual browser or one that can support multiple windows - PDA, cell phone, Lynx, screen reader, etc.

In addition, you do not have sufficient information about the client's environment to determine what the "proper" size is. You should design your pages to gracefully degrade - it should reflow nicely when the browser is smaller than what you had anticipated.

For sample code on opening a window of a specific size with Javascript, see http://developer.irt.org/script/window.htm

by jaqui

Yup, no changing the size of the client browser window.
but, depending on the type of site you are coding, you can simply pick a size and go with it for your formating.
a graphics site, for displaying a lot if images, like a gallery, is usually coded for 1024 by 768.

most other sites are coded for 800 by 600.

with tables and scripts, like php, you just design the layout to suit your site, the size is set in percetages of the screen width. though this usually entails using css to format the page.

This discussion is closed to new replies.