Relative Position
Setting the position property to “relative” (position: relative;
) allows developers to specify an amount off of the normal flow position. Rather, when an element is set to relative, it will still follow normal flow, but can be moved, relative to that position.
NOTE: This does not effect the position of surrounding elements. These other elements will continue to be positioned where they would in normal flow. This is true even if the altered element is positioned over them.
In the below example, notice how the top:
and left:
properties are used to move the second paragraph to the lower-right of where its
normal flow” position would have been.
- Previous
- Next