CSS overflow-x property
Browser support · legacy reference
ChromePartial support
SafariPartial support
FirefoxPartial support
Internet ExplorerPartial support
EdgePartial support
OperaPartial support
Description
CSS overflow-x property represents overflow of content along horizontal direction i.e. from left and right sides.
Syntax
overflow-x : visible | hidden | scroll | auto
Property values
visibleDefault
-
The content overflows horizontally out of the boundaries of the box and is also visibile.
- Try it
overflow-x: visible; hidden
-
In this case, the content that overflows horizontally out of the box becomes invisible.
- Try it
overflow-x: hidden; scroll
-
It provides horizontal scrollbar no matter whether the content overflows or not.
- Try it
overflow-x: scroll; auto
-
It is same as 'scroll' but it provides horizontal scrollbar only when the content overflows out of the box.
- Try it
overflow-x: auto;
Applicable to
It applies to block containers, grid containers, and flex containers.