[SWFObject] How to simply center SWF for all resolutions?

Brian McGill brian at newcitymedia.com
Fri Jun 2 06:26:19 PDT 2006


You can center the block horizontally like this:

#tutorials  {
    margin: 0px auto;
    width: 1024px;
    height: 768px;
    display: block;
    }

(change your width/height to whatever you need though)

brian

Jan Kratochvíl, FlashMedia.cz wrote:
> How to simply center SWF for all resolutions?
> 
> I need to have SWFon the top and horizontal center on the page for all 
> resolutions.
> I tried to use this CSS style:
> #tutorials
> {
>     margin-top: 0px;
>     margin-right: auto;
>     margin-bottom: auto;
>     margin-left: 20px;
> }
> Its only example I know, that I use exact position for margin-top and left.
> Someth. like in HTML <center>my.swf</center>
> 
> Thanks



More information about the Swfobject mailing list