SWFobject2 not working with styles

Hi everyone,

I’m using SWFObject2 to insert my swf into a web page. There are two publishing methods - static and dynamic. I’m using the dynamic method. You have to specify the id of the container that will be replaced with the flash content if enough JavaScript and Flash support is available.

If there is not enough JavaScript and Flash support then the .swf file in this container will be replaced by whatever I specify - in my case an image. So since the id of my div is “flash”, I used this as the html container id.

<div id=“flash”> <img src=“img/alternate.jpg” />
</div>

This div has some css rules applied to it that controls the layout of it, ie. it floats it etc. When I test though, the .swf file is inserted into the div but it loses the css styles. When I turn off the flash player so that the alternative image is used instead, the css works.

I wondered if anyone knows why this is happening?

Appreciate any assistance.