all groups > macromedia flash sitedesign > september 2007 >
You're in the

macromedia flash sitedesign

group:

absolute center SWF on HTML


absolute center SWF on HTML Rylz
9/14/2007 4:59:31 PM
macromedia flash sitedesign: I want to have my SWF be centered on the host HTML page both horizontally and
vertically. I've got it to center horizontal, but can't get it vertically.
Below is the tag I use in a CSS to try and center. It will center horizontal,
like I said, but that's it.


margin-left: auto;
width:800px;
height:400px;
margin-right:auto;
margin-top:auto;
margin-bottom:auto;
height:100%;
clear:left;
Re: absolute center SWF on HTML Twinbird24
9/19/2007 12:00:00 AM
Open your swf in Flash, go to File>Publish Settings... (Ctrl+Shift+F123)
Then click on the HTML tab and change Dimension: to Percent and Scale: to No
Scale. The swf will be centered horizontally and vertically, won't scale, but
this also makes it non scrollable (if that's what you wanted). Just mess around
with the publish settings until you get what you want.
AddThis Social Bookmark Button