Forum Moderators: not2easy

Message Too Old, No Replies

On top of embed

Does anyone here know how?

         

adni18

6:37 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there any way to place an image, div, or span on top of an embed, with relative positioning? I need an answer fast, so please respond ASAP.

SuzyUK

6:57 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



adni..

if the embed is inside a div then place position: relative; on the wrapper div then with image also inside that div use position:absolute; for it adjusting it's co-ordinates to suit..

Suzy

adni18

7:11 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Perhaps I should rephrase my goal. I need to place a 90x90 span on top of a 90x90 embed. I tried using z-indexing, but the span won't go on top of the embed. Can I make it go on top of the embed somehow?

SuzyUK

7:32 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



adni..

without seeing exactly the order/layout of your code, this simple test case seems to work OK... (in IE)


CSS:
#ewrap {position: relative;}
#ewrap embed {background: #0f0; width: 90px; height: 90px;}
#ewrap span {width: 80px; height: 80px; position: absolute; left: 5px; top: 5px; background: #ffc;}

HTML:
<div id="ewrap">
<embed src="my.embed">
<span>image</span>
</div>

Suzy

adni18

7:40 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the position of the embed can vary, so I can't use that method.

SuzyUK

8:13 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



adni.. why?

the div name can be changed to a class and can be used lots of times and anywhere in the page, as long as you have position:relative; set on that div, the image will take it's position from it no matter where it is the page

SuzyUK

10:04 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



adni.. on futher testing with an actual .swf file (is that what's in the embed?) it seems that they have preference , very much like an iframe in that you can't position anything on top of them

So although my pseudo code works it seems it matters what's in the object/embed.

have you more details?

anyone know if this can be done?

Suzy