To maintain position with respect to the rest of the page elements, the nearest ancestor container of any absolutely positioned element must be positioned relatively, for example -
<div id="ancestor" style="position:relative;">
<div id="xx1" style="position:absolute;">
With this code arrangement, as div#ancestor shifts in the normal flow of the code rendering, the div#xx1 will shift by a corresponding amount.
Does that help?