Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-14-2003, 06:31 PM   PM User | #1
misselaineous
New to the CF scene

 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
misselaineous is an unknown quantity at this point
Arrow Script request: Different CSS depending on screen resolution

I am looking for a script that will "sniff" out different screen resolutions and then load the correct css file according to the browser's screen resolution. I need this to be cross browser compatible if possible.

There is a script at Dynamic Drive that will display different CSS depending on OS, so I would assume that what I am requesting can be done.

Does anyone know where I can get a script to do this? Or maybe someone already has one?

ANY help at all would be really appreciated, since I don't know anything about scripting at all - that's why I use DD. I LOVE IT!!!!

Thanks in advance for any help anyone can offer.

Elaine
misselaineous is offline   Reply With Quote
Old 08-14-2003, 06:52 PM   PM User | #2
cheesebag
Regular Coder

 
Join Date: Aug 2003
Posts: 383
Thanks: 0
Thanked 0 Times in 0 Posts
cheesebag is an unknown quantity at this point
http://www.alistapart.com/stories/alternate/

And:
http://www.codingforums.com/showthre...e+sheet+switch

You can find resolution detect scripts all over. Might want to post to the HTML/CSS forum for comments on the advisability & proper use (from a design standpoint) of this technique.
__________________
 ........ another wild guess ........
cheesebag is offline   Reply With Quote
Old 08-15-2003, 12:45 AM   PM User | #3
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
There is no proper use, imo - you don't need to know a visitor's screen resolution because the information is of no use to you. I'm at 1152 x 864 but if you serve me that stylesheet it won't be right, because my window is only 800 square.
__________________
"Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark
brothercake is offline   Reply With Quote
Old 08-15-2003, 02:08 AM   PM User | #4
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
If do want to put different CSS it should depend on browser window size, not resolution. Also there should be a default stylesheet that will work when javascript is not available.
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 08-15-2003, 09:05 AM   PM User | #5
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
misselainous, don't mix up the screen resolution with the monitor's dimentions or browser window size. You may have a small monitor yet, if a smart one, with 1024x768 abilities...

Anyway, if you want to detect the browser window size, cross browser, see more at:

http://www.howtocreate.co.uk/tutoria...?tut=0&part=16
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 05:47 AM.


Advertisement
Log in to turn off these ads.