Reputation: 6894
Here's is the code http://jsfiddle.net/DTYEB/14/ , the images there overlap each other i want them beside each other. I can change the position to relative in css class .container{} but functionality of the app changes so is there any way to have spacing between the elements
Upvotes: 1
Views: 4465
Reputation: 1940
i have updated your script and add following code,
$(dragElement).css('position','relative');
$(dragElement).css('float','left');
$(dragElement).css('display','inline-table');
check now http://jsfiddle.net/DTYEB/32/
Upvotes: 1
Reputation: 5016
If you look at developer tools, you will find that each div enclosing each images has position absolute with the same coordinates.
The issue is there:
.container{
position:absolute;
width:64px;
height:64px;
top:200px;
left:300px;
z-index:0;
}
Do this:
.container{
width:64px;
height:64px;
z-index:0;
}
And create a parent div which has an absolute position.
This is one solution among a lot.
Upvotes: 2