11 Replies Latest reply: Sep 2, 2009 11:51 AM by bregent RSS

    Scaling page

    BearHNC Community Member

      Hello,

      I have a site that is half flash based and half HTML (CSS) based. On my flash portion I have my .swf set to view at 100% no matter the size of the browser window, and I would like my HTML pages to function the same way, is this possible? can any one help me with the code necessary to complete this task?

       

      Thanks in advance!

        • 1. Re: Scaling page
          garywpaul Community Member

          The only way anyone can offer anything but a guess is to post a link to the page.

           

          Gary

          • 2. Re: Scaling page
            BearHNC Community Member

            The site is not live to external users yet it is only on in internal mirror site, I can give you the code that I have for my HTML pages but I am not having trouble with my code that I have used I want to know if there is a container style that allows for my webpage to view at 100% no matter how big someones browser window is open. I figure sense you can do it with an .swf you can do it with an image table. Does that make my problem more clear?

            • 3. Re: Scaling page
              garywpaul Community Member

              What type of containers do you have now?  What type of container is the flash sitting in? <div> <table> apdiv?

               

              Better yet, post the code.

               

              Gary

              • 4. Re: Scaling page
                BearHNC Community Member

                Here are the 2 sets of code I don't know if that will help because I have not tried to do what i plan I doing but here you go.

                • 5. Re: Scaling page
                  garywpaul Community Member

                  I dont see how that will work, first, you have all apdivs, a container that should never be used as a layout tool.  You have fixed, set widths and heights and you are asking them to expand, it does not work that way.

                   

                  If you want elements to expand on width, the container must be set to a %, you dont have any and I dont think apdiv can have them anyway, not sure, I hardly use them.

                   

                  To get a flash file to expand, what you can do is to set the width of the flash file to something like 2800px, then put it in a container set to 100% width, and set the CSS rule

                   

                  overflow: hidden;

                   

                  This way you dont have a huge horizonal scroll bar running on the bottom.

                   

                  Set the container holding the rest of the content to the same width...

                   

                  Perhpas someone smarter and more expereinced than me can offer a better solution, but mine would be to start over with a new design and insert the content that you have.

                   

                  Sorry I cna offer more help.

                   

                  gary

                  • 6. Re: Scaling page
                    pziecina CommunityMVP

                    Hi Gary

                     

                    I agree, I took one look at the code and said no-way.

                     

                    PZ

                    • 7. Re: Scaling page
                      garywpaul Community Member

                      PZ

                       

                      Thanks for the post, I have noticed that you in the past have offered solutions to designs dependant on apdiv's, so you are one of the "smarter and more experineced" folks I was refering to.

                       

                      Gary

                      • 8. Re: Scaling page
                        BearHNC Community Member

                        I am not really concerned with weather it will work with this code because I might very well redo these pages, but if I decide to redo them I want to know if it is possiable, is there a code that allows you to view an html page at 100% no matter what size the users browser window is at. I have tried to make this clear but my pooint is not getting across, I have not applied nor have I ever tried to apply this to my html pages my flash page does do this, my boss likes that about it and wants the rest of the pages to functions as so, but before I go throught recreating these pages I need to know if it is even possiable to have an html page view as a percentage rather then a fixed width. I imagine it would be a container style, currently have a container that auto centers which I like but would prefer to have it auto scale. Is this possiable, please leave the current documents out of the equation, I have tried to make this clear but I guess I am wording myself wrong.

                        Thanks,

                        • 9. Re: Scaling page
                          garywpaul Community Member

                          Yes, it is possible, in fact you have already said the answer yourself.

                           

                          In your CSS rule,

                           

                          #container     {

                               width:100%;

                               margin: auto;

                          }

                           

                          I might suggest you set it to 90% or something less than 100 to show just a little background.

                           

                           

                          If you are adding elements within this container, set the width accordingly, meaning if you are to have 2 column, one might be 40% the other may be 60%, but keep in mind margins, padding and borders will have an effect on this.

                           

                          HTH

                           

                          Gary

                          • 10. Re: Scaling page
                            pziecina CommunityMVP

                            Hi

                             

                            Using % values is possible see - http://www.adobe.com/devnet/dreamweaver/articles/bk_dwcs4_mastering_css/bk_dwcs4_mastering _css_04.pdf. However flash in full screen mode resizes the browser window only when the user selects full screen mode (if set to fullscreen automatically then see next part), if you automatically resize the browser window for the user then 99% of your users will leave your site immediately. As such behavior is associated with 'other types of sites' (read there what you wish).

                             

                            PZ

                            • 11. Re: Scaling page
                              bregent CommunityMVP

                              >Is there a code that allows you to view an html page at 100% no matter what size the users browser window is at.

                               

                              Just to clarify one more little bit, are you looking for the text and graphical elements to resize too? You can accomplish that with Flash but not html. If you just need the page to resize using percentages, then yes. Do a search for liquid layouts and you will find out how to do this.