CSS Positioning

Element is positioned relative to its normal position. Offsets move it without affecting other elements' layout.

Position

Offsets

top0px
left0px
right0px
bottom0px

Options

relativeElement is positioned relative to its normal position. Offsets move it without affecting other elements' layout.
/* Target Element */
.target {
position: relative;
}
Ancestor Container (position: relative)
Original Position
target
relative
Target Element
Original Position
Ancestor Container

Quick Reference

PositionRemoved from FlowReference PointScroll Behavior
staticNoScrolls normally
relativeNoItself (normal position)Scrolls normally
absoluteYesNearest positioned ancestorScrolls normally
fixedYesViewportFixed to viewport
stickyNoScroll container thresholdSticks on scroll