That all depends on can cause the divs to move, if it's a window resizing window.onresize = function(){}
or in jQuery $(window).resize(function(){});
if it's caused by user interaction (like clicks and what have you): document.body.addEventListener('click',function(){},false);
, where the handler is preferably a closure of sorts, that holds the initial position of the divs in question.
If it's caused by new content inserted due to an ajax call: let the onreadystatechange
handler sort it out. Again, preferably use a closure to compare the position to the initial values
There might be an easier CSS3 way, I'm no designer - so I don't really know. Also: set up a fiddle of what you've tried so far an what your page looks like. And be a bit more precise about this issue. Your question is terribly vague. Read the FAQ's