[SWFObject] trying to center align swf in browser window

Susan Karasic karasicpark at pacbell.net
Sat May 13 13:35:36 PDT 2006


Have you tried aligning the div containing the swf using CSS?


for example if you had a div  named "container"  <div id="container"> 
that held your swf file,

you could use this code in your style sheet for that div (using your 
own width and height sizes):

#container {
	position: relative;
	margin: 0 auto;
	width: 640px;
	height: 480px;
}

Note: You need to give the div a width and height.

Setting the margin-left: auto; and margin-right: auto; centers the div.

hope this helps,

Susie K.


On May 12, 2006, at 11:58 PM, Peter Perugini wrote:

> Hello,
> I am trying to align the swf in the center of the browser window, but
> it does seem to work. I tried so.addParam("align", "center"), but it
> positions the swf in the same position as a "left " align. When I
> experiment with so.addParam("align", "right") it seems to work. Any
> suggestions on the center alignment.
>
> Thanks,
> Groovy
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>




More information about the Swfobject mailing list