Positioning

(1) By default, blocks of text just folow each other
(2) One after another.
(3) A relative position moves a block away from where it would normally lay out.
(4) And text after that just lays out. So be somewhat careful with relative.
(5) Fixed text is relative to the window. It maintains its position even when the window is resized or scrolled. A link that never goes away.
(6) Absolute text is relative to its parent element. In this case the div is positioned relative to the body tag. It maintains its position even when the window is resized or scrolled.
(7) In a sense, the fixed and absolute elements are "plucked out" of the the normal render stream and as such take up no vertical space. there is not any padding or margin left behind by these tags.
(8) Where did this text go?
(9) Why can't I see (8) but it took up space?

Go back to the Starting page.