container-name

Assigns a name to a container so that nested elements can style themselves based on that specific container's size or state.

Quick facts

Initial value
none
Inherited
No
Applies to
all elements
Animation type
notAnimatable

Values

none

container-name Browser Support

Widely available Since 2023 93% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2023.

Safe to use without fallbacks.

105+
110+
16+
105+
ESC