Auto-Resize a Web site.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChetG
    New Member
    • Sep 2007
    • 7

    Auto-Resize a Web site.

    I am re-designing my website and I want it to resize itself according to each visitors browser and resolution settings. I have been trying for hours to solve this issue but have found nothing. Here is the URL for the problem page. Anyone with any advice would be greatly appreciated.



    Thanks, ChetG
  • iam_clint
    Recognized Expert Top Contributor
    • Jul 2006
    • 1207

    #2
    you need to use percentages like height="100%" width="100%"

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      Originally posted by ChetG
      I am re-designing my website and I want it to resize itself according to each visitors browser and resolution settings. I have been trying for hours to solve this issue but have found nothing. Here is the URL for the problem page. Anyone with any advice would be greatly appreciated.



      Thanks, ChetG
      Look at this Code.
      [code=javascript]
      var width,height;
      if(typeof window.pageX){ height = window.pageY;wi dth = pageX;}
      else if(typeof window.screenX) {height = window.screenY; width = screenX;}
      else {height=documen t.body.offsetHe ight;width=docu ment.body.offse tWidth;}
      [/code]

      Best of Luck with that. :-)

      Kind regards,
      Dmjpro.

      Comment

      • dmjpro
        Top Contributor
        • Jan 2007
        • 2476

        #4
        Originally posted by iam_clint
        you need to use percentages like height="100%" width="100%"
        This one would be more appropriate.

        Kind regards,
        Dmjpro.

        Comment

        • ChetG
          New Member
          • Sep 2007
          • 7

          #5
          I tried to use the Javascript but I don't know enough about Javascript so I don't believe that I am utilizing it correctly.

          I have tried making the width and height of the table into percentages but that isn't changing anything. Do I need to go through and make every slices width and height a percentage too?

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            You've set the table width as "1343". Change that to 90% or whatever percentage you want.

            Comment

            • ChetG
              New Member
              • Sep 2007
              • 7

              #7
              Originally posted by acoder
              You've set the table width as "1343". Change that to 90% or whatever percentage you want.

              I have done that, but it still isn't resizing to a smaller size when other people try to view it. It will get larger, but not smaller.

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Originally posted by ChetG
                I have done that, but it still isn't resizing to a smaller size when other people try to view it. It will get larger, but not smaller.
                Your images are too large. You'll have to resize them.

                Comment

                • ChetG
                  New Member
                  • Sep 2007
                  • 7

                  #9
                  Originally posted by acoder
                  Your images are too large. You'll have to resize them.
                  The problem with resizing the images is that they're being used as part of the layout itself.

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    #10
                    Originally posted by ChetG
                    The problem with resizing the images is that they're being used as part of the layout itself.
                    But if the images are too large and you won't resize them, the website is not going to resize.

                    Comment

                    • ChetG
                      New Member
                      • Sep 2007
                      • 7

                      #11
                      This page no longer exists; nor does the problem. Feel free to read the blog it's attached to, but you won't see the issue described in the question.

                      Comment

                      Working...