Click to See Complete Forum and Search --> : div tag and .swf layering problem


SRD
August 14th, 2006, 06:47 PM
Hey there everyone. As the title suggests, I'm running into some difficulty involving .swf files. I am trying to position an image in my html document on top of an embedded swf file. I tried using div tags: <DIV STYLE="position:absolute; top:0px; left:0px">, but for some reason the .swf file which is set to take up 100% of the page overlaps it. Is there any way I can keep the .swf file at 100% and get the image on top of it? I appreciate any help in advance!

HanneSThEGreaT
August 15th, 2006, 05:04 AM
Hello SRD! If I understand correctly, you need to set the z-index property.

Have a look here :
http://css.somepeople.net/zindex

PeejAvery
August 15th, 2006, 07:39 AM
Absolutely correct as usual.

Also see W3Schools: z-index (http://www.w3schools.com/css/pr_pos_z-index.asp)

SRD
August 15th, 2006, 12:01 PM
I read the tutorial in the link you provided me, but it seems like it might only work for img tags. I tried applying the style attribute to the object tags that embed my .swf, but still the image remains underneath. Might I be doing something wrong?


<img src="wiilogo(s).jpg" STYLE="position: absolute; top: 0px; left: 0px; z-index: 1">
<center>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="countdown" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="countdown.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="countdown.swf" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="countdown" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</center>


Where might I apply the STYLE attribute and z index to my embedded .swf object?

PeejAvery
August 15th, 2006, 01:24 PM
I read the tutorial in the link you provided me, but it seems like it might only work for img tags.
No. z-index is a standard stylesheet. It can be applied to any HTML object.

Your problem is that you are working with embedded flash. This is still a problem that the only solutions are annoying.

You can create the flash object in an iframe with a lower z-index.

SRD
August 15th, 2006, 08:38 PM
That's a pretty good idea. It's too bad the only solution is so sloppy though.