Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > different css to dif resolution

Reply
Thread Tools

different css to dif resolution

 
 
julian_m
Guest
Posts: n/a
 
      11-24-2005
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

 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      11-24-2005
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?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Christina Aguilera - Make Over
 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      11-24-2005
julian_m wrote:

> 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.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      11-24-2005
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?

--
Neredbojias
Contrary to popular belief, it is believable.
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      11-24-2005
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.

--
Neredbojias
Contrary to popular belief, it is believable.
 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      11-24-2005
Neredbojias wrote:

> 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

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Electric Boys - Tear It Up
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      11-25-2005
With neither quill nor qualm, Els quothed:

> Neredbojias wrote:
>
> > 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.

--
Neredbojias
Contrary to popular belief, it is believable.
 
Reply With Quote
 
CalgaryWebGuy
Guest
Posts: n/a
 
      11-25-2005
julian_m wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dif b/w interfaces and abstract classes? malli Java 4 07-08-2007 10:08 AM
What is the dif? =?Utf-8?B?ZG9ubmEgZA==?= Windows 64bit 4 11-20-2006 01:26 PM
Test PC SP/DIF to Dolby Decoder Use.Netuser.de Computer Support 5 12-08-2004 06:12 AM
Building comp. dif page. joevan Computer Support 0 07-10-2004 09:17 AM
What's the dif between: @_[0] and $_[0] ? user Perl 1 12-09-2003 08:35 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57