PDA

View Full Version : View my Site as per User Resolution



Jamal
10-05-2006, 11:19 AM
Im design my site 1024x768 Resolution . I want view my site user as per his Resolution settings. plz help me

Twey
10-05-2006, 07:07 PM
Im design my site 1024x768 ResolutionThere's your problem right there. Stop using pixel sizes.

djr33
10-06-2006, 02:13 AM
If you're asking how to preview the site at different resolutions, right click on the desktop; properties; settings tab; slide the resolution back and forth to your liking; Hit ok.

If you're on a mac, not windows, apple menu, system preferences, displays. Choose resolution. (OS9 is similar, though I can't remember the exact steps.)

There may also be a shortcut icon in the taskbar (windows) or right side of the menu bar (mac), which is a fast way to change the resolution.

Eclyps19
10-06-2006, 10:19 AM
maybe he's asking how to change the looks of the site depending on what resolution the viewer is using?

I believe you can just do this...




<script language="javascript">
var screenSize = screen.width + 'x' + screen.height;

switch(screenSize)
{
case "800x600": window.location="http://www.google.com";
case "1024x768": window.location="http://www.yahoo.com";
case "1280x1024": window.location="http://www.alltheweb.com";
}
</script>


I'm not 100% positive though, so someone correct me if I'm wrong.

Twey
10-06-2006, 01:59 PM
<script language="javascript">language is deprecated for type.
case "800x600": window.location="http://www.google.com";
case "1024x768": window.location="http://www.yahoo.com";
case "1280x1024": window.location="http://www.alltheweb.com";And if the user is running a different resolution? Or even, doesn't have Javascript enabled? This is a hideous solution that doesn't cater for unusual resolutions, and requires an entirely new page for each possible resolution.

Eclyps19
10-06-2006, 02:16 PM
well he can always put a very large list of resolutions, or check to see if their browser allows dhtml. if it doesn't then he can set it to the default page for all resolutions.

Actually, what WILL happen if javascript isn't enabled? Won't it just, not run the script?

hmmm

Twey
10-06-2006, 02:34 PM
Actually, what WILL happen if javascript isn't enabled? Won't it just, not run the script?Exactly, thus leaving the user on a default page that will most likely look bad at his/her resolution (if the OP is clever) or a blank page (if not).
well he can always put a very large list of resolutionsHm, well, most mobile devices today have a screen size of around 300px&#215;200px, if I remember correctly. The biggest desktop resolution in common use is 1600px&#215;1200px, although larger resolutions are becoming more common as graphic cards become more powerful. Working within those bounds (although they're certainly not a catch-all) there are 1300*1000 == 1,300,000 resolutions possible. Assuming inaccuracy to 20px is acceptable, that reduces it to only 65,000 possible resolutions. No problem to hard-code them all, right? Remembering, of course, that each individual resolution needs a separate page.

Or the OP could take the easy way out and stop using absolute measurements. :)

Eclyps19
10-06-2006, 02:52 PM
lol well Twey, isn't that being a tad bit unrealistic?

When you make a product, you want to satisfy the majority of the people who will use it. I would say take all the common resolutions on a normal and widescreen

640 x 480
800 x 600
1024 x 768
1152 x 864
1600 x 1200
1280 x 1024
1600 x 1280
1680 x 1050

and maybe a few others. And for mobile users, register yourself a .mobi address and adjust your site to that.

For the people who use 200 x 1200 resolutions, they don't deserve a specialized display for them.

Most sites don't even have different displays for different resolutions, so they will never even know the difference.

As for not using absolute measurements.... no idea how the hell to do that =)

Twey
10-06-2006, 02:59 PM
When you make a product, you want to satisfy the majority of the people who will use it.But if you just design your site well in the first place, you can easily satisfy all the people who can use it.
As for not using absolute measurements.... no idea how the hell to do that =)http://www.w3schools.com/css/default.asp

Eclyps19
10-06-2006, 03:07 PM
But if you just design your site well in the first place, you can easily satisfy all the people who can use it.

very true. Can you show me a site that looks as well under 640 x 480 as it does under 1680 x 1050? Or maybe a site that looks good under 300 &#215; 200 and 1680 x 1050.

Well I guess this is where we have to define "looks good". For me, looking good would be not having to use horizontal scroll bars and being able to read the text clearly.

I'm sure you can find one, since you are Twey, but I'd like to just take a look at it, since I should probably design my sites that follow the same guidelines.

djr33
10-06-2006, 06:44 PM
Yeah. Widescreen. totally different.
My rule is to make it fit within 800x600 well, then expand in a way that works ok for larger resolutions.
I don't usually worry about mobile devices because they can't really do much of the stuff that I have on my sites, like a forum, and forms/flash/etc.
I'd just say, if you really need to do all this, create seperate pages for computers and mobile devices. PHP could help... but it would be a lot of work.

Twey
10-06-2006, 08:08 PM
Of course, my own: http://www.twey.co.uk/

djr33
10-07-2006, 08:50 AM
Heh. Note that one of my displays can run at 2100x1700 or something.