Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Sizing windows for all resolutions automatically

How do I compensate for all screen resolutions at once?



7:14 pm on Dec 1, 2008 (gmt 0)

5+ Year Member


I generally set my screen to 800x600 because my eyes are getting old. However, I know other common sizes are 1024x768 and 1280 x 800, etc.

Is there a way to design a page that will automatically size itself to the user's resolution so that half the page isn't either missing or that it appears too small on their screen?



7:24 pm on Dec 1, 2008 (gmt 0)

5+ Year Member

Hi Margo,

You might benefit from reading up on css liquid layouts [google.com]


8:38 pm on Dec 1, 2008 (gmt 0)

5+ Year Member

Thanks for the tip...but it didn't help. I've been to websites that seem to automatically "fit" my screen whether they're on my laptop or my monitor. Is there script for this?


11:57 pm on Dec 2, 2008 (gmt 0)

5+ Year Member

Hi ML - There are 2 ways I know of to do this. One is to float everything. Then it all rearranges itself to fit the window. Everything is always onscreen, but it's not always pretty.

Another is to code the widths of divs and images etc, in percents. I believe there are some issues with fonts in percents and maybe others, but in general it works very well. You can make every 'box' or container shrink or expand, and images too. The text (in ems or pixels) will flow and push down the bottom of their containers.

I've been using this method very successfully. I did get one big surprise though. Coding on a 1024x368 screen, I discovered that many of my web optimized images became very grainy and filled with artifacts and moire patterns when viewed on a computer with a 1200x800 screen. But hey, the tweaking never stops :).

Many here know alot more than I do about CSS,and they may have something to say on issues with IE and other things when using percents.

[edited by: commanderW at 11:59 pm (utc) on Dec. 2, 2008]


1:32 am on Dec 3, 2008 (gmt 0)

5+ Year Member

Wow, thanks commanderW...this is very helpful. I'll give it all a whirl and see what happens -- gotta love that coding...it always keeps ya guessing ;o)

(the Shadow knows!)