Solice UI
Back to the curriculum

Chapter 3 · CSS & Layout

Normal flow and positioning

Browsers already know how to place blocks and inline content in a readable order. Normal flow should do most of the work; positioning is useful when an element truly needs a special relationship.

Beginner · Lesson 4 of 6 in this chapter

Normal flow preserves document order

Block content stacks and inline content follows the writing direction. This default adapts naturally when text wraps or content grows, which makes it a reliable starting point for responsive pages.

Positioning changes the relationship

Relative positioning creates an anchor without removing the element from flow. Absolute positioning removes it from normal space, fixed attaches it to the viewport, and sticky switches behavior as its scroll boundary is reached.

Placing a badge on a card

  1. Keep the card in the grid's normal flow.
  2. Make the card a positioned anchor.
  3. Absolutely position the small badge within the card without using positioning for the card's main content.
  • Start with normal flow.
  • Absolute elements do not reserve layout space.
  • Use positioning for real overlays or anchored controls, not basic page structure.