Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.57 KB

overflow-x.md

File metadata and controls

27 lines (22 loc) · 1.57 KB

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.

Values

visible
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.
hidden
Content is clipped if necessary to fit horizontally in the padding box. No scrollbars are provided.
clip
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.
scroll
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.
auto
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.

Examples

overflow-x="hidden"
overflow-x="scroll"
overflow-x="visible"
overflow-x="auto"