Skip to content

The CSS positioned layout module defines the coordinate-based positioning and offsetting schemes available in CSS and the properties used to position and stack elements on a web page. The module is best known for defining the basic positioning methods, including relative positioning, sticky positioning, absolute positioning, and fixed positioning. It also defines how positioned elements are painted and layered, clarifying stacking behavior and visual order.

The positioned layout module defines the physical, logical, and shorthand . The logical properties enable developing with internationalization and responsiveness in mind.

Like all CSS modules, this module impacts and is impacted by other modules. This module describes how positioning interacts with other layout modules such as CSS flexible box layout and CSS Grid layout. Other modules, such as CSS anchor positioning, build upon this module to enable positioning elements relative to other elements and layers.

Reference

Properties

  • bottom
  • inset
  • inset-block
  • inset-block-end
  • inset-block-start
  • inset-inline
  • inset-inline-end
  • inset-inline-start
  • left
  • overlay
  • position
  • right
  • top

Selectors

  • ::backdrop

Glossary terms and definitions

Guides

  • float

  • clear

  • transition-property

  • transition-behavior

  • Popover API

  • element

  • CSS anchor positioning module

    • position-anchor
    • position-area
    • position-try-fallbacks
    • position-try-order
    • position-try shorthand
    • position-visibility
  • CSS transforms module

    • transform
    • transform-origin
    • translate

Specifications

See also

  • Other CSS *-position properties:
    • background-position
    • background-position
    • background-position
    • font-synthesis-position
    • font-variant-position
    • list-style-position
    • mask-position
    • object-position
    • offset-position
    • ruby-position
    • text-emphasis-position
    • text-underline-position
  • Position-related data types
    • baseline-position
    • content-position
    • overflow-position
    • self-position
  • CSS Scroll Snap module