Results 1 to 5 of 5

Thread: Resolution Check

  1. #1
    Join Date
    Jul 2004
    Long Island

    Question Resolution Check

    My site is built using CSS and looks good on most computers, however, on some computers where the resolution is set larger, it does not display properly. Is there a way for my site to check the viewers resolution and either make the change (temporarily) or suggest a change for better viewing?

    Any help would be appreciated.

  2. #2
    Join Date
    Feb 2003
    Wales, UK
    Here is a relevant link, but I haven't checked if it's valid: http://www.pageresource.com/jscript/jscreen.htm
    In a world without walls and fences - who needs Windows and Gates?! - Unknown Author
    "And there's Bill Gates, the...most...famous...man in the...ah...Microsoft." -- A TV commentator for the 2000 Olympics.

    Web Design Faq? | W3C | Validator | Accessibility testing | Speed up your PC | Wura | Box Model Research

  3. #3
    Join Date
    May 2004
    Manhattan NY
    screen.width returns the screen resolution's width. Testing just width should be enough. There's no 1024x769 as far as I know. So if the width is 1024, you know the height is 768

  4. #4
    Join Date
    Mar 2005
    Sydney, Australia
    Surely the internal size of the browser window is more relevant that the screen size since the existing toolbars on the screen plus the browser chrome can make even full screen browser windows completely different sizes.

    function pageWidth() {return window.innerWidth != null? window.innerWidth: document.body != null? document.body.clientWidth:null;}
    function pageHeight() {return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:null;}

  5. #5
    Join Date
    Apr 2005
    Bathurst, NSW, Australia
    The Ultimate Browser Sniffer is cool (it doesnt check resolution though... so bit off the subject but sometimes useful... www.wideopenwin.com/JavaScript/browsersniff.html

    I keep a copy just incase, It checks browser & version, OS & version, javascript & version...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles