5 Replies Latest reply on Feb 26, 2010 2:12 PM by vonstack

    how to center swf website in html

    vonstack
      hey im having a super hard time doing the easiest thing i just want my website centered. heres the code:
      Also its 4.2 mb that seems kind of big or is that normal? the site is christianvonstackelberg.net id be happy to send to source file. thanks.
        • 1. Re: how to center swf website in html
          Ned Murphy Adobe Community Professional & MVP
          Try:

          <body bgcolor="#ffffff"> // no change here, just for reference
          <div align="center">
          • 2. Re: how to center swf website in html
            RossRitchey Level 4
            All you need to do is set the div to be align="center" to center it on the page. Or you can edit your "christian" id style to include the following:

            #christian{
            width:100%;
            text-align:center;
            }

            NOTE: I looked at your posted website source and notice that it is slightly different than your posted code. I noted that the div that contains your scripts has the id of "christian" and the two following divs are removed. I am assuming that you made a style for the "christian" id in your center.css script. Of course, if you took the code you posted here, all you would need to do is move the script/noscript block of code into the two divs below, making sure that "christian" is styled to be 100% width and text-align:center, or simply remove the "christian" div altogether. IE:

            <html>
            <head>
            ------Head information
            </head>
            <body>
            <div align="center">
            <script>
            ------AC_FL_RunContent stuff
            </script>
            <noscript>
            ------Object tag
            </noscript>
            </div>
            </body>
            </html>
            • 3. Re: how to center swf website in html
              RossRitchey Level 4
              Also, I noted that some of your links are "broken" All of your getURL's need to have absolute paths ( http:// included). If you link to "www.somesite.com" it will simply append that on to the end of the current url, so you would get " http://christianvonstackelberg.net/www.somesite.com" instead of redirecting to somesite.com
              • 4. Re: how to center swf website in html
                vonstack Level 1
                Thank you so much man I'm going to make the changes now ill update again when I fixed them. One more thing I cant seem to get the hand to toggle to let the user know that there is a site with larger pictures because its a movie clip. any suggestions maybe add an eventlistener? Thanks doggie
                • 5. Re: how to center swf website in html
                  vonstack Level 1
                  Thank you so much!!! dude it looks 10 times better. This is probably going to help me get a good job so you know your help went to helping someone have a chance to succeed. Any other comments would be greatly appreciated. Thanks.