I am trying to make a resizable and draggable div that is at a fixed position. The div looks fine when I resize it from the right or bottom; however, when I resize it from the left or top, the draggable div seems to increase height/weight in the opposite position.
Here is the code: HTML
<div id="draggableDiv" >
<div id="resizableDiv">
<div id="content"><div id="contentTitle"></div></div>
</div>
</div>
JS:
$('#draggableDiv').draggable({
handle: '#contentTitle'
});
$("#resizableDiv").resizable({
handles: 'n, e, s, w, ne, se, sw, nw'
});
CSS:
#draggableDiv {
position:fixed !important;
width:auto;
height:auto;
left:100px;
top: 100px;
}
#resizableDiv {
height: 200px;
width: 200px;
}
#content { height:100%; width:100%; }
What should I do to make the draggable div resizes itself correctly?