Relatively positioned elements and absolutely positioned elements work hand in hand, right?

An absolutely positioned element is relative to the closest parent element that is relatively positioned, and if there is no relatively positioned element, by default, the absolutely positioned element is relative to the browser viewport, right? 

If this is true, if the closest relatively positioned parent elements are above and below the parent of the absolutely positioned element which one would the absolutely positioned element be relative to?