CSS: Position Property

By Xah Lee. Date: . Last updated: .

What is the Position Property

The position property lets you:

Position Values

position ValueNew LayerRelative To
staticno(Normal Flow). Default.
relativenoRelative to its normal position.
fixedyesRelative to window.
absoluteyesRelative to its containing block.

position:static

The position:static is the default for all elements.

The position of element of position:static is either below the previous element, or to the right of the previous element.

If the previous element is a block element, then next element is positioned below it. (block elements are div, p, img, h1 etc.)

If the previous element is a inline element, then next element is positioned to the right of it (or below if container box width is reached). (inline elements are span, a (link), b (bold), etc.)

CSS Position

CSS, Layout