liveBook · Manning

Fixed positioning

Fixed positioning is a CSS positioning mode that places an element relative to the viewport or a fixed-position containing block, keeping it stationary as document content scrolls.

How 2 Manning books explain it

CSS in Depth, Second Edition

Fixed positioning is a CSS positioning mode that removes an element from normal flow and positions it relative to the viewport or a containing block established for fixed positioning.

How it is used
Positions modal dialogs and desktop navigation against the viewport so they remain in place during scrolling.
How deep it goes
Works through viewport offsets, inset shorthands, a modal implementation, and stacking behavior; leaves built-in dialog behavior to the HTML dialog element.
Examples
Uses a scrolling modal with a full-viewport backdrop and a responsive navigation menu docked to the left.
What you can do after
Build it from scratch with CSS offsets, then diagnose overlaps by checking markup order and z-index.

Read how CSS in Depth, Second Edition explains fixed positioning →

Web Design Playground, Second Edition

Fixed positioning is a CSS positioning mode that places an element relative to the browser window and keeps it stationary during scrolling.

How it is used
Keeps navigation bars or footers visible during scrolling.
How deep it goes
Explains viewport anchoring and scrolling, then demonstrates offsets, stacking, and content clearance with a fixed footer.
Examples
Uses a photo-gallery footer, a fixed navigation-bar possibility, overlapping elements, and z-index layering.
What you can do after
Apply it via CSS by anchoring an element to the viewport and preserving content visibility beneath it.

Read how Web Design Playground, Second Edition explains fixed positioning →

Also covered in

What to know first

Related concepts

Questions about fixed positioning

What is fixed positioning?

Fixed positioning is a CSS positioning mode that places an element relative to the viewport or a fixed-position containing block, keeping it stationary as document content scrolls.

Which Manning books explain fixed positioning?

CSS in Depth, Second Edition and Web Design Playground, Second Edition.

What should I know before learning fixed positioning?

Manning books that teach fixed positioning usually introduce viewport, CSS unit, footer section and normal flow first.

What is the difference between fixed positioning and sticky positioning?

Fixed positioning is a CSS positioning mode that places an element relative to the viewport or a fixed-position containing block, keeping it stationary as document content scrolls. Sticky positioning is a CSS positioning mode in which an element remains in normal document flow until a specified offset threshold is reached, then stays constrained within its containing block as scrolling continues.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.