View Full Version : Drag and Drop HELP!!!!!

07-20-2005, 06:17 PM
I've used the drag and drop script from dynamic drive on my website and its working great! But how to i change the images layer properties so that some pictures will go overtop others, cuz right now they just go randomly. :confused:

07-20-2005, 08:32 PM
Well actually, the items later in the HTML markup will go over the ones earlier. From the example:

<img src="test.gif" class="drag"><br>
<img src="test2.gif" class="drag"><br>
<h1><b class="drag">Hi there</b></h1>Hi there will always be on top, test2.gif will always be on top of test.gif but under Hi there, test.gif will always be under the other two. To change this behavior, either change the order or use the z-index property of each element's style. For example, we can reverse the situation with z-index:

<img src="test.gif" class="drag" style="z-index:100;"><br>
<img src="test2.gif" class="drag" style="z-index:50;"><br>
<h1><b class="drag" style="z-index:10;">Hi there</b></h1>Now test.gif will always be on top and Hi there always on the bottom. I used 100, 50 and 10 but you can use any numbers. The higher z-index will always be on top of the lower z-index.

07-21-2005, 04:01 AM
omg thank you sooooooo much! I really needed help on that one!!