A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: My website will not center in my browser

  1. #1
    Member
    Join Date
    Feb 2005
    Posts
    63

    My website will not center in my browser

    This was created in swishmax, and it does not center in my browser no matter what i do, can you guys look at it and give me feed back..... does it center for you. Any suggestions on how to center it??
    Thank you
    Ty Heiss
    www.garrettafs.com

  2. #2
    Carpe Diem - Moderator wolfgross's Avatar
    Join Date
    Apr 2001
    Location
    SWiSHzone
    Posts
    1,700
    ..it does center horizontially but if you also want to center it vertically, you best of to stick your movie into a "table", eg...

    [COLOR=royal blue]
    <table width=100% height=100% border=0 cellpadding=0 cellspacing=0>
    <tr>
    <td align=center valign=middle>

    <object classid="clsid.D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"
    id="finalpage" width="912" height="549">
    <param name="movie" value="finalpage.swf">
    <param name="bgcolor" value="#823520">
    <param name="quality" value="high">
    <param name="allowscriptaccess" value="samedomain">
    <embed type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    width="912" height="549"
    name="finalpage" src="finalpage.swf"
    bgcolor="#823520" quality="high"
    swLiveConnect="true" allowScriptAccess="samedomain"
    ></embed>
    </object>

    </td></tr></table>
    [/COLOR]


    wolf
    Last edited by wolfgross; 03-27-2005 at 05:49 AM.

  3. #3
    Member
    Join Date
    Feb 2005
    Posts
    63
    Wow, thanks.... do i put this in the html part of the page?? can i insert it any where?

    Thank you so mutch.
    Ty

  4. #4
    Carpe Diem - Moderator wolfgross's Avatar
    Join Date
    Apr 2001
    Location
    SWiSHzone
    Posts
    1,700
    ...no, this has to go into your html page.

    wolf

  5. #5
    Junior Member
    Join Date
    Jun 2002
    Location
    Ventura, CA
    Posts
    17

    <body...> (html)

    Hello

    You should also make sure in your HTML that:
    this line includes -

    <body topmargin=0 leftmargin=0>

    This makes sure that regardless of your content and/or browser window size, that ALL the content starts in the top left of the browser window, otherwise you are subject to an automatic default margin (typ. 16/12 pixels from the left edge and top edge).

    Regards,
    fxDesigner

  6. #6
    Member
    Join Date
    Feb 2005
    Posts
    63
    Okay, im exited that it is possible to center my page correctly, but I have no clue how to even get to the place where i need to insert the text you gave me, and when i get there, can i insert it in any order with the rest of the html text? When i open the html half of my swf. file (the webpage) it comes up as a blank red screen(the background of the webpage) in internet explorer. There is a cursor to type with but no other text and when i put what you gave me in there the page did not function. I geuss i am asking you to do a step by step if you would be so kind to my ignorance (no really) about these things
    Thank you very much
    Ty

  7. #7
    Junior Member
    Join Date
    Jun 2002
    Location
    Ventura, CA
    Posts
    17

    HTML access

    Hello:

    Ok, we have to make sure of a couple of things -

    1) Do you have any understanding of the premise/structure of HTML?

    2) Do you have the ability to FTP/Post your content/webpage/website to a server for access to view by others?

    BRIEFLY:
    1- To view any typical HTML content, in your browser, click view, select source and if the file is small enough it should load in Notepad or you will be prompted to open it in another editor such as wordpad - the structure of a basic page will be similar to this:

    <html>

    <head>
    <title>HTML Page</title>
    <meta name="author" content="fxdesigner">
    <meta name="copyright" content="©2005 All Rights Reserved">
    <meta name="description" content="Professional, inexpensive web design. PrePress layout, graphic design.">



    </head>

    <body topmargin=0 leftmargin=0 bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">

    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td>
    <p align="center"><b><font size="3" color="#FFCC66"><br>
    <font face="arial, helvetica">
    </td>
    </tr>
    </table>
    </center>
    </div>

    </body>

    </html>

    This code is NOT the definitive answer to proper html coding, but it will give you the most basic understanding of where to get started.

    You need to define the document type: <html> then construct the page: <head> <title>HTML Page</title></head><body> Your content (text, flash, pictures, etc)and finally close the document: </body></html>

    This explanation is extremely simplistic, but all HTML starts with these basic construction principles.

    2- Once you construct your page, you have to have the ability to place the pages on a server where others can see them. (DNS)
    The pages you create are transferred via FTP using a gateway interface and then (determined by other factors) the pages are available on the server for others to see. (Again, a very basic explanation).

    Hope this helps (some).

    Regards,
    FX Designer

    (I went to your website (above) and the first thing that struck me is the fact your page is very large - in fact the page is centered it looks skewed when viewed at 800 x 600 and centered on displays of 1024 x 768 or larger). There are ways to ensure that your page stays centered regardless of resolution but you should be aware of your target audience's ability to view your content. Not everyone knows how to change their screen resolution, or are using a browser window smaller than the dimensions of your website (Flash®) content. Therefore the scrollbars appear within the browser window.
    Last edited by fxdesigner; 03-29-2005 at 02:44 PM.

  8. #8
    Junior Member
    Join Date
    Jul 2008
    Posts
    3

    having the same problem

    I added a table as suggested with the correct code for centering, but it still isn't working, any suggestions?

    www.swaddlecouture.com/swaddle.html

  9. #9
    Carpe Diem - Moderator wolfgross's Avatar
    Join Date
    Apr 2001
    Location
    SWiSHzone
    Posts
    1,700
    ...try this:
    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>swaddle</title>
    
    </head>
    <body bgcolor="#6bb9c2" topmargin=0 leftmargin=0 marginheight=0>
    
    <table width=100% height=100% border=0 cellpadding=0 cellspacing=0>
    <tr>
    <td align=center valign=middle>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" name="swaddle" width="550" height="400" align="default" id="swaddle">
          <param name="allowScriptAccess" value="sameDomain" />
          <param name="allowFullScreen" value="false" />
          <param name="movie" value="swaddle.swf" />
    	  <param name="quality" value="high" />
    	  <param name="bgcolor" value="#ffffff" />
          <embed src="swaddle.swf" width="550" height="400" align="default" quality="high" bgcolor="#ffffff" name="swaddle" allowscriptaccess="sameDomain" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />    
    </object>
    </td>
    </tr>
    </table>
    </body>
    </html>
    wolf

  10. #10
    Junior Member
    Join Date
    Jul 2008
    Posts
    3
    AMAZING! Thank you! What was wrong, for future reference? Thanks!!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center