I'm attempting to create a nice looking droppable area for elements that align themselves to the center of a wrapper. I've got the whole drag drop bit working but was wondering if anybody knew a solution to the centering issue already.
All of the divs are exactly 320x240 (webcams) and have already got the initial css for the first element which centers nicely. Now what I'm looking for is when a new div is dropped within the area the existing one moves over to accomodate for the new one, all remaining as centered as possible.
When there are two divs I imagine they could be side by side, when there are three a kind of triangle with one up two down, four would look like 2 up 2 down etc.
I can't imagine this hasn't already been done, but looking for a jquery plugin etc has proved fruitless.
Any help is much appreciated! Thanks in advance