A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Center swf in window (for smaller resolutions)

  1. #1

    Unhappy Center swf in window (for smaller resolutions)

    I'm trying to force an swf to be centered in a browser window. The swf is wider than many monitor resolutions. I would like the swf to be centered, horizontally on these monitors as well, so a person could scroll left or right to view the whole thing. I do not, however, want it to center vertically. I just want it to be flush to the top of the window. I've tried several things using Dreamweaver, but I'm not having much luck. Any quick advice???


  2. #2
    Senior Member
    Join Date
    May 2007
    Add this to your css;
    * {margin:0; padding:0;} This will remove any default padding and margin from any browser. Margins and padding will have to be used on containers that require it for presentational purposes.
    Add this to your container that holds your movie;
    #moviecontainer {
    margin:0 auto;}
    This will center the movie container horizontally and insure there is no space at the top.

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