SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2001
    Location
    Sunshine Coast, QLD, Australia.
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy detecting screen resoltuions

    Hey, does anyone know how to detect the users screen resolutions and send them to a different page, depending on which resolution they are using?

    |-- m a l i c i o u s --|
    signature

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if (screen.width == "1280") location.href = "1280by1024page.html";
    else if (screen.width == "1024") location.href = "smallerpage.html";

    etc.

    You should realize that having separate pages for different resolutions is a bad idea. Instead you should design your pages to scale to the user's screen size.
    ck :: bringing chris to the masses.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2001
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Anarchos

    You should realize that having separate pages for different resolutions is a bad idea. Instead you should design your pages to scale to the user's screen size.
    in general yes, but I am thinking it would be useful sometimes to detect screen resolution to resize images. (an image that looks fine at 800x600 is pretty puny at 1600 resolution.)Another reason I like Opera's zoom.

    The problem with resize is many people browse with window open but at odd sizes, and only open full screen when they see something they want to peruse further.
    so you have to do a lot of < or =, or > or =, to cover all possibilities of screen size. Have to take into account that screen size is not viewing size. Also you have to code for Netscape's 4 habit of losing the css on resize. In general it is just a pain in the butt, besides having to load separate style sheets for every resolution.

    stevo


Bookmarks

Posting Permissions

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