3

The problem i am facing is with the resizability of the div. When i use it with Draggable, it gives the problem and not able to resize it width-wise.

If i use the resizable alone, then it is fine. But i need to make it work with draggable feature.

Pls suggest.

click the jsFiddle link for the demo.

Karan
  • 3,265
  • 9
  • 54
  • 82

2 Answers2

6

Adding a position:relative; to the container solves the issue.

See this working Fiddle Example!

#ParentDIV {
    position: relative;
}
Zuul
  • 16,217
  • 6
  • 61
  • 88
0

If your draggable element is absolutely positioned and your container is absolutely positioned you can set the dragged element to a fixed width and height. This will create a bounding box and prevent the draggable from falling off the edges.

#container {
    position:absolute;
}

#draggedObject {
    position:absolute:
    width: 100px;
    height: 50px;
}
mbokil
  • 3,202
  • 30
  • 22