Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
Relative positioning keeps the original flow space; absolute positioning removes the box from normal flow and uses a containing block; fixed commonly uses the viewport.
With position: relative, offsets move the box visually without moving the space reserved in normal flow. An absolutely positioned box is out of flow and is positioned relative to its containing block, often established by a positioned ancestor. A fixed box is also out of flow and is normally anchored to the viewport, but properties such as transform on an ancestor can establish a different containing block. top and left are offsets, not substitutes for choosing the right positioning context.