Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Normal document flow
Can somebody explain to me what in css positioning means normal document flow and what means element taken out of normal document flow?
Ezra Siton12,644 Points
Related course: https://teamtreehouse.com/library/css-layout-basics
Normal document flow it's like saying
position: static"- "normal behavior of the browser"
The element is positioned according to the normal flow of the document. The top, right, bottom, left, and z-index properties have no effect. This is the default value.
In the most simple view: If you turn off CSS you get the "normal flow" :) when you add to your site "sticky-fixed-nav" you taken out this nav from the normal flow of the doc.
Once a box has been laid out according to the normal flow or floated, it may be shifted relative to this position. This is called relative positioning (W3C)
In the absolute positioning model, a box is removed from the normal flow entirely (W3C)
Fixed positioning is a subcategory of absolute positioning. The only difference is that for a fixed positioned box, the containing block is established by the viewport (W3C)
Summary: The best way to learn this issue is by examples (treehouse, codepen and so on)