Forum Moderators: open

Message Too Old, No Replies

using particular CSS according to screen resolution

detecting resolution with javascript and point the right css file

         

still learning

2:35 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



Hello,

I am trying to find out how, by using Javascript, I can can detect the screen resolution and according to it, point a css file.
There would be about 3 different css files according to the different resolutions.

thank a lot in advance.

By the way, everytime I click on "site search" it doesn't work. do you know why?

whoisgregg

7:00 pm on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use the code found in this thread [webmasterworld.com] and it works perfectly. :)

still learning

2:02 pm on Aug 4, 2005 (gmt 0)

10+ Year Member



thanks a lot, it works perfectly

JAB Creations

9:00 pm on Aug 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a bad coding practice...

You should be using percentages to define items greater then 512 pixels in width.

whoisgregg

9:22 pm on Aug 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ideally, web design would be done only using fluid layouts to accommodate any window width. However, even using fluid layouts, I use screen width specific style sheets to push larger, more appropriate proportionally sized graphics to users with well over 800 pixel screen widths. (Every fluid layout that looks good in 640x480 looks stupid at 1920x1280 if it uses the same graphics.)

Some day universal access to broadband and better browser/OS support for graphics smoothing will allow me to use the same high quality PNG files with percentage sizing but until then... :)

JAB Creations

6:39 am on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ohhh... vector background images! IoI...

"Daddy, how much ram did you have when you were my age?"

"Oh I had 2GBs"

"Of proccessor cache?"

bedlam

7:46 am on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Some day universal access to broadband and better browser/OS support for graphics smoothing will allow me to use the same high quality PNG files with percentage sizing but until then... :)

I'm holding out for SVG [google.com] baby!

-B

whoisgregg

6:45 pm on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmm, I'd written off SVG completely because Adobe had failed to get good saturation... I wonder if their purchase of Macromedia (including Flash) will give SVG another chance? :D

Bernard Marx

8:05 pm on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Such a mastery of sarcasm is seldom displayed these days.