overflow-x
Controls what happens to content that is wider than its container. It can be hidden, clipped, or made to scroll horizontally.
It is documented as part of the CSS Overflow specification.
Syntax
/* Usage Example */
.image-gallery {
/* Allows users to scroll horizontally through a row of images */
overflow-x: scroll;
white-space: nowrap;
}
/* Syntax */
overflow-x: visible;
overflow-x: hidden;
overflow-x: clip;
overflow-x: scroll;
overflow-x: auto;
/* Global values */
overflow-x: inherit;
overflow-x: initial;
overflow-x: revert;
overflow-x: revert-layer;
overflow-x: unset;
overflow-x 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.
1+
3.5+
3+
12+