position: absolute;

An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed):

This div element has position: relative;
This div element has position: absolute;

THIS IS THE CODE

div.relative {

position: relative;

width: 400px;

height: 200px;

border: 3px solid #73AD21;

}

div.absolute {

position: absolute;

top: 80px

right: 0;

width: 200px;

height: 100px;

border: 3px solid #73AD21;