overflow-x

The overflow-x CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content.

Initial value visible
Applies to Block-containers, flex containers, and grid containers

Syntax

  
overflow-x: scroll;
  

Values

Content is not clipped and may be rendered outside the padding box's left and right edges. If overflow-y is hidden, scroll or auto and this property is visible, it will implicitly compute to auto.
Content is clipped if necessary to fit horizontally in the padding box. No scrollbars are provided.
Like for hidden, the content is clipped to the element's padding box. The difference between clip and hidden is that the clip keyword also forbids all scrolling, including programmatic scrolling. The box is not a scroll container, and does not start a new formatting context. If you wish to start a new formatting context, you can use display: flow-root to do so.
Content is clipped if necessary to fit horizontally in the padding box. Browsers display scrollbars whether or not any content is actually clipped. (This prevents scrollbars from appearing or disappearing when the content changes.) Printers may still print overflowing content.
Depends on the user agent. If content fits inside the padding box, it looks the same as visible, but still establishes a new block-formatting context. Desktop browsers provide scrollbars if content overflows.

Browser support

overflow-x1123.559.53
clip81

We use cookies to improve your experience. Learn more in our Privacy policy.

×