So every time I drag and drop an element to a div two problems happen. 1. It doesn't fit to the div. 2. It collapses when I drag and drop one element so I need a way to keep the space the element used to take intact.
https://jsfiddle.net/1yy2u8qw/
$( ".selector" ).droppable({ tolerance: "fit" }); //is this correct?
It looks like you missed <table>
and .drop
have height:90px
- so dragged into element will overflow it. Change to min-height:90px
Here is the solution