A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] Aligning flash website to vertical centre of browser

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    13

    resolved [RESOLVED] Aligning flash website to vertical centre of browser

    i hav a flash website that i want to align in the vertical center of my browser....

    i used all possible combos of publish settings in flash cs4 but it dint publish my webpage in center ....

    so pls give me a html code i can put in my index.html so that my flash object aligns itself in center ...
    btw i have used following code to align it in horizontal center....
    <body>
    <div align="center">
    //my embedded flash object
    </div>
    </body>

  2. #2
    Member
    Join Date
    Nov 2007
    Posts
    36
    CSS2 does not have vertical centre attribute, but tables do. What you need to do is tell CSS to treat your div as a table, and the content as a table cell and vertical align the content in the cell:

    Actionscript Code:
    <style type="text/css">
    .outer {
     display: table;
     height: 100%;
     width: 100%;
    }
    .inner{
     display: table-cell;
     vertical-align: middle;
     text-align:center;
    }
    </style>

    Actionscript Code:
    <div class="outer">
    <div class="inner">
    ...content...
    </div>
    </div>

    [edit]
    This does not work in IE.
    Last edited by cintaria; 08-23-2010 at 05:08 AM.

  3. #3
    Junior Member
    Join Date
    Jun 2010
    Posts
    29
    You can try

    <div style="text-align:center;">
    .................
    ..........
    </div>
    ****************************************
    ****************************************
    Create standalone SWF slideshow with Premium flash templates!

    DIY slideshow template using flash template editor

    Learn more about how to make your own template and DIY fathers day ecard

  4. #4
    Junior Member
    Join Date
    Jul 2010
    Posts
    13
    thnks.... that worked great for me!!!!

  5. #5
    Member
    Join Date
    Nov 2007
    Posts
    36
    d'oh >.< thought you wanted horizontal align!

Tags for this Thread

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