maintain position when positioning is changed

maintain position when positioning is changed

Consider the following

<div id="pearent">
    <div id="child"></div
</div>

the pearent has static positioning

Is there any easy way to read what the top and left properties of the child would be if it had fixed positioning.
answer this question for both a child with absolute and a child with relative positioning.