Remember that the position: relative attribute allows the children within that element to be place relative to that element. It essentially defines a new point by which elements can be placed, relatively.
So if we have a div (oneDiv), with position: relative, and then another div (twoDiv) within that div, that has position: absolute, then the second div (twoDiv) will be positioned absolutely, but relative to its parent.
.oneDiv {
position: relative;
top: 100px;
background-color: red;
height: 200px;
width: 200px;
}
.twoDiv {
position: absolute;
right: -50px;
top: -50px;
background-color: blue;
height: 100px;
width: 100px;
}
<div class="oneDiv">
<div class="twoDiv">
</div>
</div>
As such, "top" is no longer the top of the document, but the top of the childs parent. By using the above example, you can ensure you keep your layout, and if you move .oneDiv, regardless, twoDiv will follow with it.