Forum Moderators: open

Message Too Old, No Replies

Need HTML to place an image over some javascript

         

maha123

7:33 pm on Jul 31, 2004 (gmt 0)

10+ Year Member



i'm working on a website...didn't put the whole thing online yet.

i want to know how can i place an image over a specific part of a javascript. i tried layers and position, but the image always end up behind the script.

tedster

8:13 pm on Jul 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forum, maha123.

Can you explain a bit further? Javascript itself should not be displayed on the page, although your script may be using document.write() to place some element in the page.

So, what is the javascript placing on your page?

maha123

9:27 pm on Aug 1, 2004 (gmt 0)

10+ Year Member



i really don't know how to explain the script i have/made. images that move and appear from differnt directions.

i want to place an image over the bottom part of the script, i tried Z-index, but i don't know how to put the code for the script?

do you know what i can do?

tedster

11:42 pm on Aug 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When you use z-index to position the image, did you also use position:absolute and give it offset coordinates in pixels -- top: and left: for instance -- relative to its containing element?

maha123

1:40 am on Aug 2, 2004 (gmt 0)

10+ Year Member



yes, i did that...i just don't know how to do the same for the script. this is what i did for the image

<STYLE TYPE="text/css">
#ex1 {position: absolute; top: 535; left: 60; z-index: 2}
</STYLE>
<BODY>
<IMG ID=ex1 SRC=artblack.gif>
</LAYER>
</BODY>

tedster

4:21 am on Aug 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The <layer> tag was stillborn, never made it into the standard, and is pretty much extinct (NN4 only). Plus, if that markup is a copy/paste, then you never opened the element, you only closed it.

Don't be hypnotized by Dreamweaver's language to describe a "layer". There is really only a <div></div> element, not a <layer></layer>. So either use <div> or just position the <img> tag itself, which is what it looks like you set out to do anyway.

So what is this visible javascript all about?

Perhaps that is the problem - are you displaying the text of a script inside a form element of some kind, like a textarea? That might make for trouble. As far as I know you cannot place anything "on top of" a form element, just as you can't get "on top of" a flash object.