CSS Position

Relative

Relative positioning is almost identical to the default static positionining. The only difference is that once the relative element has been positioned in its initial position, we can modify its final position by setting the top, bottom, left and right properties.

Code and Preview

Description

Notice how the relatively positioned element (green box) is pushed out from the left side of the page, by 100px, compared to the other boxes.

Editor
Preview