different css to dif resolution

J

julian_m

I'm thinking to do the following to be able to render the page
according to the user resolution

[pseudo-code]

<html>
<head>
<meta blah blah blah
......

if userselect = 800x600 {
<link rel="stylesheet" type="text/css" href="style800.css" >
}elseif userselect = 1024x768 {
<link rel="stylesheet" type="text/css" href="style1024.css" >
}elseif userselect = 640x480 {
<link rel="stylesheet" type="text/css" href="style640.css" >
}

[/pseudo-code]

Note that it will be coded in php, and the user will select certain
resolution (userselect parameter) given his own preferences

What do you think about this aproach?

regards - julian
 
E

Els

julian_m said:
I'm thinking to do the following to be able to render the page
according to the user resolution

[snip pseudo-code]
Note that it will be coded in php, and the user will select certain
resolution (userselect parameter) given his own preferences

What do you think about this aproach?

Useless.
What if the user has the resolution set to 1280x1024 but is surfing
with their browser set to 933x867?
 
T

Toby Inkster

julian_m said:
I'm thinking to do the following to be able to render the page
according to the user resolution

CSS 3 does actually have this sort of stuff built-in -- it's called "media
queries". Opera 7.2(?)+ has experimental support.

A page I'm working on right now has, to insert a decorational image:

DIV#image {
height: 200px;
width: 200px;
background: transparent url("img-200.png");
}

@media screen and (max-width: 320px) {
DIV#image {
height: 48px;
width: 48px;
background: transparent url("img-48.png");
}
}

This example displays a smaller background image on devices less than 321
pixels wide.

It's not much use on the wild, wild web right now, unless you're
developing a page specifically aimed at Opera users (which I am in this
case), but it's bloody good fun, and will hopefully provide a very useful
technique for us all in the future.
Note that it will be coded in php, and the user will select certain
resolution (userselect parameter) given his own preferences

Firstly, make sure you have a sensible default (probably the middle option).

Secondly, remember that browser size and resolution do not go hand in
hand. See: http://tobyinkster.co.uk/browser-sizes

Thirdly, most people don't know what resolution they're using. They
probably don't even know what "resolution" means. Unless you're targetting
a technical group, or a group of graphics designers, don't ask people what
their resolution is.
 
N

Neredbojias

With neither quill nor qualm, julian_m quothed:
I'm thinking to do the following to be able to render the page
according to the user resolution

[pseudo-code]

<html>
<head>
<meta blah blah blah
.....

if userselect = 800x600 {
<link rel="stylesheet" type="text/css" href="style800.css" >
}elseif userselect = 1024x768 {
<link rel="stylesheet" type="text/css" href="style1024.css" >
}elseif userselect = 640x480 {
<link rel="stylesheet" type="text/css" href="style640.css" >
}

[/pseudo-code]

Note that it will be coded in php, and the user will select certain
resolution (userselect parameter) given his own preferences

What do you think about this aproach?

In most cases wouldn't percentages work the same?
 
N

Neredbojias

With neither quill nor qualm, Els quothed:
julian_m said:
I'm thinking to do the following to be able to render the page
according to the user resolution

[snip pseudo-code]
Note that it will be coded in php, and the user will select certain
resolution (userselect parameter) given his own preferences

What do you think about this aproach?

Useless.
What if the user has the resolution set to 1280x1024 but is surfing
with their browser set to 933x867?

Then she would get the "normal" resolution unless she opted for a
smaller one for convenience.
 
E

Els

Neredbojias said:
With neither quill nor qualm, Els quothed:
julian_m said:
I'm thinking to do the following to be able to render the page
according to the user resolution

[snip pseudo-code]
Note that it will be coded in php, and the user will select certain
resolution (userselect parameter) given his own preferences

What do you think about this aproach?

Useless.
What if the user has the resolution set to 1280x1024 but is surfing
with their browser set to 933x867?

Then she would get the "normal" resolution unless she opted for a
smaller one for convenience.

Ah, okay, like this then:

What's your resolution?
[] 640x480
[] 800x600
[] 1024x768
[] I don't know
[] My resolution is not what counts,
but my window is about
[] 640 wide
[] 800 wide
[] 1024 wide
[] I don't know
[] I'll have the flexible version, please - thanks :)
 
N

Neredbojias

With neither quill nor qualm, Els quothed:
Neredbojias said:
With neither quill nor qualm, Els quothed:
julian_m wrote:

I'm thinking to do the following to be able to render the page
according to the user resolution

[snip pseudo-code]

Note that it will be coded in php, and the user will select certain
resolution (userselect parameter) given his own preferences

What do you think about this aproach?

Useless.
What if the user has the resolution set to 1280x1024 but is surfing
with their browser set to 933x867?

Then she would get the "normal" resolution unless she opted for a
smaller one for convenience.

Ah, okay, like this then:

What's your resolution?
[] 640x480
[] 800x600
[] 1024x768
[] I don't know
[] My resolution is not what counts,
but my window is about
[] 640 wide
[] 800 wide
[] 1024 wide
[] I don't know
[] I'll have the flexible version, please - thanks :)

-Er, I guess. Seems a bit complicated but the general concept of
letting the user pick the page size is one I like and one I think is
possible.

Btw, Opera 8.51 is out but I dunno what they changed.
 
C

CalgaryWebGuy

julian_m said:
I'm thinking to do the following to be able to render the page
according to the user resolution

[pseudo-code]

<html>
<head>
<meta blah blah blah
.....

if userselect = 800x600 {
<link rel="stylesheet" type="text/css" href="style800.css" >
}elseif userselect = 1024x768 {
<link rel="stylesheet" type="text/css" href="style1024.css" >
}elseif userselect = 640x480 {
<link rel="stylesheet" type="text/css" href="style640.css" >
}

[/pseudo-code]

Note that it will be coded in php, and the user will select certain
resolution (userselect parameter) given his own preferences

What do you think about this aproach?

regards - julian

Remember the three click rule.

If it takes the user more than 3 clicks to find what they are looking
for, they've gone to another site.

The site would have to be pretty special for me to fill out a form
before I even view the site.

IMHO.

Jeff

__
www.calgarywebguy.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top