CoverYourASP --> Using available space |
This page is an example of code I wrote to solve the dilemma of how wide to design a web page. Rather than making a decision to design for 640 or 800 (or even 1024 pixels wide) I enclose the whole page in a table, and then resize the table depending on the available size. If the browser doesn't support the events described below then it will just stay at the default size. So you still have to make the decision of what the default size will be, but I suggest that it's probably acceptable to assume that a machine running an older browser is limited to 640 pixels. Furthermore you can design your page to show more content if there is extra space. Below you will see either 2, 4 or 6 cells depending on your screen resolution. If you have space to spare, experiment with resizing the browser window...
Last, but not least, you can go one step further and dispense with the initial 'flash' when you have a high resolution screen by storing the last size used in a cookie. It's likely that the next time you visit this page the browser window will be the same size. Here's the article that I'll use when I finally get around to making this work on Netscape. |