[SWFObject] center aligning

Geoff Stearns geoff at deconcept.com
Sun May 14 08:37:30 PDT 2006


Hey peter, another list member replied to this already. Here's what  
she said:

----
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 14, 2006, at 4:42 AM, Peter Perugini wrote:

> 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
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com




More information about the Swfobject mailing list