Click to See Complete Forum and Search --> : AI Width


Kaisa
04-28-2003, 06:51 PM
How to you make it so that a site changes its size for different screen res.

PeOfEo
04-28-2003, 08:36 PM
simple, you dont. What you do is make your index page a defalt 600 X 800 res (for people with oulder browsers, 800 x 600 is most common, followed by 1024 x 786) then use a java script redirect if they use any other resolution to that resolution's page so that it will display peachy on all resolutions. But you cant actually make it resize, unless use use percents but that would mean stretching it all, I mean you can just use percents, thats what I would do but it might now work out as prettily. Like say <something width="50%" or "100%" or whatever

Charles
04-28-2003, 08:43 PM
Actually, creating a page that works on any screen size is quite easy. In fact it's easier than making one that works on only one screen size. Start with a page in HTML 4.01 Strict that follows the Web Content Accessibility Guidelines 1.0 and then play around with CSS layouts. Just what CSS tricks you will employ will depend on your particular layout, but in general you will want to try to control the page as little as possible. Let things flow.

PeOfEo
04-28-2003, 08:52 PM
well yea. but you will still be using percents wich might leave gaps and spaces at higher resolutions, but I guess you can create some cleaver little css scripts that will make this interesting, andyway you wont get a lot of 1280 by 1024's

Charles
04-28-2003, 09:02 PM
Indeed, you can expect that a great number of the folks using higher resolution screens will not have their browser windows maximised. Which is one of the reasons why using JavaScript to sniff out the screen resolution will not work.

PeOfEo
04-29-2003, 11:17 AM
good point, did not think of that one.

PeOfEo
04-29-2003, 11:18 AM
but you could always use j script to resize the browser to fit your needs too, but that is annoying

spufi
04-29-2003, 11:36 AM
My resolution is 1400X1050 and I use a maxed out window. I will notice some sites do have a good amount of space on them due to my above normal resolution, and I don't really mind it that much. I use a mix of percentages and "px" for my own site.

Kaisa
04-29-2003, 12:12 PM
I could try it in CSS but what are all the commands ?

spufi
04-29-2003, 01:31 PM
A broad question deserves a broad answer. :D

http://www.w3.org/TR/REC-CSS2/

One example is...

div { width:80%; }

Kaisa
04-29-2003, 03:26 PM
Originally posted by spufi
A broad question deserves a broad answer. :D

http://www.w3.org/TR/REC-CSS2/

One example is...

div { width:80%; }

:p thanks