Absolute positioning
Absolute positioning is a CSS layout technique that removes an element from normal flow and positions it relative to a containing block, typically established by a positioned ancestor.
CSS in Depth, Second Edition
Absolute positioning removes an element from normal flow and positions it relative to a containing block, typically established by a positioned ancestor.
- How it is used
- Places controls and popup menus over nearby content without shifting the surrounding layout.
- How deep it goes
- Explains containing-block selection and inset placement through worked UI examples, then addresses overlapping elements through stacking order.
- Examples
- Uses a modal Close button, a click-controlled dropdown, and a mobile navigation button.
- What you can do after
- Build it from scratch: anchor an overlay to a positioned ancestor and diagnose unexpected placement or overlap.
Read how CSS in Depth, Second Edition explains absolute positioning →
Tiny CSS Projects
Absolute positioning is a CSS positioning technique that removes an element from normal flow and positions it relative to a containing block established by a positioned ancestor.
- How it is used
- Positions a card face over another and moves mobile table headers offscreen without removing their information from assistive technologies.
- How deep it goes
- Explains normal-flow removal, ancestor-based placement, unset offsets, and sizing effects through CSS declarations.
- Examples
- Shows an overlaid card back and a table header shifted offscreen while data-attribute labels identify mobile cells.
- What you can do after
- Operate/configure it with CSS offsets to overlay card faces or hide table headers visually while retaining their information for assistive technologies.
Architecting Accessibility
Absolute positioning places an element at coordinates relative to a containing block instead of participating in normal document flow.
- How it is used
- Preserves access to content and functionality when users customize text spacing.
- How deep it goes
- Recommends avoiding absolute positioning for text and layout elements, without detailing its mechanics.
- Examples
- Demonstrates a disappearing “Read more” link after custom text spacing is applied.
- What you can do after
- Evaluate layouts by applying custom text spacing and checking that content and functionality remain accessible.
Read how Architecting Accessibility explains absolute positioning →
Also covered in
What to know first
- viewportA viewport is the visible region of a browser or graphical interface in which a document or other content is displayed.
- containing blockA CSS reference rectangle used to resolve certain descendant properties, including an element's dimensions and position.
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
Related concepts
- containing blockuses · A CSS reference rectangle used to resolve certain descendant properties, including an element's dimensions and position.
- dropdownconfigures · A dropdown is a user-interface control that presents selectable options, often revealing them when activated.
- strong elementused by · The HTML strong element marks content as having strong importance, seriousness, or urgency.
- viewportuses · A viewport is the visible region of a browser or graphical interface in which a document or other content is displayed.
Questions about absolute positioning
What is absolute positioning?
Absolute positioning is a CSS layout technique that removes an element from normal flow and positions it relative to a containing block, typically established by a positioned ancestor.
Which Manning books explain absolute positioning?
CSS in Depth, Second Edition, Tiny CSS Projects and Architecting Accessibility.
What should I know before learning absolute positioning?
Manning books that teach absolute positioning usually introduce viewport, containing block, CSS and CSS unit first.
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.


