views:

77

answers:

0

Hi I am using jQuery 1.8 and I want to have a custom 'draggable' control that is a child of a jquery dialog. I am encountering lots of problems as I want the draggable control to shrink to its contents size (its a div for now) and be clipped with in the dialog bounds.

If I set the control to position absolute it behaves perfectly but does not clip properly against the dialog - by this I mean it will clip against the dialogs outer perimeter rectangle but it will incorrectly be draggable across the dialogs title bar - where it should clip behind.

If I set the control to a relative position or float left it clips correctly but then its positioning goes wrong when I resize the dialog - it doesn't stay in its relative fixed place.

I've tried a million things none of which are working so suggestions welcome!