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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2007
    Posts
    148
    Thanks
    4
    Thanked 4 Times in 4 Posts

    How do I display a different page based on resolution?

    So, I'm in the process of making another site, I was hoping to do it all in HTML/CSS, with a liquid layout, so it could be viewed (properly) at any resolution... So far, it's not working out.

    My question is, what would be the best way to display the proper page, based on resolution? Javascript to detect their resolution? Just ask the user to select their resolution? :/ Making images and everything for several resolutions isn't a problem, I'm just not sure how to go about displaying the proper version.

  • #2
    Regular Coder BWiz's Avatar
    Join Date
    Mar 2006
    Location
    Sol System
    Posts
    471
    Thanks
    7
    Thanked 21 Times in 21 Posts
    If it a liquid layout, you shouldn't have to worry too much about browser resolution, the site would adjust to the size of the browser. However, once you've started using the liquid layout, all your measurement values should be in percents.
    BWiz :: Happy Coding!
    2006
    2007 2008 2009
    2010 2011
    Irrational numbers make no sense.

  • #3
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Generally your images will stay the same, whatever resolution you're using. There are simply too many different screens for this to work effectively.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    One way to handle it is to set up floated divs that will appear side by side if the browser is wide enough and which appear below one another if the browser is narrower.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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