Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Aug 2003
    Posts
    383
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 ........

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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"

  • #5
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    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
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •