auto adjustment of html pages according to screen resolution

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shalini Bhalla
    New Member
    • Dec 2007
    • 190

    auto adjustment of html pages according to screen resolution

    I have seen some sites which do get automatically adjustments depending on screen resolution , how is it possible ?
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    hi ...

    with JavaScript you would be able to retieve the viewport properties and you may use that to adapt the page onload or when you need it ...

    kind regards

    Comment

    • Shalini Bhalla
      New Member
      • Dec 2007
      • 190

      #3
      w to use it exactly i tried but idon't know how it will exaclty be ?

      Comment

      • Shalini Bhalla
        New Member
        • Dec 2007
        • 190

        #4
        i visited page but it has been removed from net can you suggest me something else

        Comment

        • gits
          Recognized Expert Moderator Expert
          • May 2007
          • 5390

          #5
          Originally posted by Shalini Bhalla
          i visited page but it has been removed from net can you suggest me something else
          the link works ... what specific problem do you have? please post some code you have done so far and explain what is not working as expected ...

          kind regards

          Comment

          • Shalini Bhalla
            New Member
            • Dec 2007
            • 190

            #6
            actually i didnt do anything on that , and the page show is also diffrent its not the same page which i saw that day and coding is also not there , so if you can provide me the new link of some other tutorial which i could understand , will be greatful




            regards
            shalini
            Last edited by Shalini Bhalla; Feb 26 '08, 09:10 AM. Reason: P.s

            Comment

            • gits
              Recognized Expert Moderator Expert
              • May 2007
              • 5390

              #7
              have a look here and use the window.resizeTo () - method to adapt the browser-window's size ...

              kind regards

              Comment

              • peuijen
                New Member
                • Feb 2008
                • 4

                #8
                [CODE]
                Hi Gits,

                Having read your reply, I wonder how I can ensure users will always be able to read my website, irrespective of screen resolution and explorer (Firefox, IE6, etc.). I have built a website (using external CSS files) that picks the appropriate CSS file depending on the user's explorer (<!--[if IE 7]...), but I want it to pick a CSS file that addresses both the user's type of explorer and his/her screen resolution. Could you help me out?

                Thanks!

                Peter
                [CODE]

                Comment

                • Shalini Bhalla
                  New Member
                  • Dec 2007
                  • 190

                  #9
                  The answeres i have received are for rezizing window but i want to adjust my whole site acording to change if it opened in 600 * 800 then it should be in full screen an if it Opened in 1024 * 768 , thats waht i want ....any body can tell me

                  Comment

                  • gits
                    Recognized Expert Moderator Expert
                    • May 2007
                    • 5390

                    #10
                    you cannot do that this way ... you HAVE TO resize the window to the max screen-resolution with javascript and have to layout all your pages (aka: your site) in a way that they adapt to the window-size ... so just avoid fixed sizes etc. or adapt that too during the resize operation ...

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      Moved to the JavaScript forum.

                      Moderator.

                      Comment

                      Working...