Reputation: 13
Please for help on this jsfiddle
The problem is when you drop element it does not position well. I know the problem is because of left: 12px; in css but cant figure out how to solve.
$('.b').droppable({
drop:function(event, ui) {
ui.draggable.detach().appendTo($(this));
}
});
$('.b').selectable();
$('.c').draggable({
helper:"clone",
revert: 'invalid',
opacity: 0.5,
grid: [30,36],
});
Upvotes: 1
Views: 92
Reputation: 959
I think this is what you are looking for jsfiddle
.b { background: #BBFFBB;
width: 24px;
float: left;
border-style: solid;
height:30px;
line-height: 30px;
}
.c { background: #D00000 ;
position: relative;
width:25px;
height: 30px;
text-align: center;
line-height: 24px;
}
.a{
width: 100%;
float: left;
}
I removed the left
and margin
s then changed some of the width
s I think this is what you were looking for.
Upvotes: 0
Reputation: 24001
in css
.b { background: #BBFFBB;
width: 24px;
float: left;
border-style: solid;
height:30px;
line-height: 30px;
}
.c { background: #D00000 ;
position: relative;
height: 24px;
text-align: center;
line-height: 24px;
padding: 3px 3px 3px 3px;
}
.a{
width: 100%;
float: left;
}
Upvotes: 1