overflow-y

Controls what happens to content that is taller than its container. This is the most common way to add a vertical scrollbar to a box.

Quick example

.code-snippet {
  max-height: 400px;
  /* Adds a vertical scrollbar if the code is long */
  overflow-y: auto;
}

Quick facts

Initial value
visible
Inherited
No
Applies to
block, flex, and grid containers
Animation type
discrete

Values

visiblehiddenclipscrollauto

overflow-y Browser Support

Widely available Since 2020 96% global usage

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

Safe to use without fallbacks.

1+
3.5+
3+
12+
ESC