Click to See Complete Forum and Search --> : moving transparent images
paperbox005
09-25-2004, 05:33 AM
i have a transparent image, i was wondering if its possible in javascript to move another image beneath it. if someone could paste some small bits of code?
im worried if the layers of the two images will interfere
thanks
rhsunderground
09-25-2004, 08:40 PM
luckily, no JS needed:D <img src="bottom.jpg" style="position:absolute; top:20px; left:20 px;z-index:-1" alt="bottom image" />
<img src="top.jpg" style="position:absolute; top:20px; left:20 px;z-index:99999" alt="top image" />this will more or less put the top.jpg on top of anything (the 99999 is just a really big number i used. you can use 1 if you'd rather.)
Vladdy
09-25-2004, 09:26 PM
jpg does not support transparency....
The easiest:
<img src="top.gif" style="background:url(bottom.gif)" />
rhsunderground
09-25-2004, 09:33 PM
forgot about that fact. i was assuming that they would replace the src i gave with the image they had. thanks for the alternative, though.