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
visibleInherited
No
Applies to
block, flex, and grid containers
Animation type
discrete
Values
visiblehiddenclipscrollautooverflow-y Browser Support
Widely availableSince 202096% 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+