resizing a large DIV : positioning contained smaller DIVs

resizing a large DIV : positioning contained smaller DIVs

Hi,

My first foray into jquery and this forum !

I have a number of  (dynamically created) draggable DIVs.
I am using the 'containment' option, to keep them all within one large DIV.
This is working very well.

I have now made the large DIV resizable.  When I resize the large DIV, and make it smaller, any of the small DIVs that are now outside the resized large DIV stay there.  If I attempt to drag any of the smaller DIVs that are now outside the reduced-sized large DIV, they immediately respect the 'containment' parameter and 'jump' back into the container.

2 questions :

1.  Is there any method using jquery to ensure the smaller DIVs remain enclosed in the large DIV, while the resizing of the larger DIV is taking place?
 
A small experiment suggests to me that I can do it myself by calculating DIV sizes and offsets, and the moving any of the small DIVs if required.

I'm sure it would be a lot tidier (and at least as efficient), if I can achieve the result using jquery.

2.  Separately, if I were to make the large DIV draggable, can I maintain the relative positions of the enclosed smaller DIVs, sort of like an 'also-draggable' option?

Thanks.

Neil.