CSS overflow Property


The overflow property is specified as one or two keywords from the list below. If you specify two keywords, the first applies to overflow-x and the second to overflow-y. Otherwise, overflow-x and overflow-y have the same value. This is in charge of the main content. It indicates whether the content should be clipped or scroll bars should be added.

Syntax

Example

Preview

Property Values

Value Description
visible The overflow has not been clipped. It renders outside the box of the element. This is the default setting.
hidden The overflow has been clipped, and the rest of the content will be hidden. Programmatically scrolling content is possible (for example, by setting scrollLeft() or scrollTo().
clip The overflow has been clipped, and the rest of the content will be hidden. Scrolling is prohibited, including programmatic scrolling.
scroll The overflow is clipped, but a scroll bar is added to allow access to the remaining content.
auto If the overflow is clipped, a scroll bar should be added to allow the user to see the rest of the content.
initial This property is set to its default value.
inherit This property is inherited from its parent element.

Supported Browsers

Property Chrome Firefox Safari Edge / IE Opera
overflow 1.0 1.0 1.0 4.0 7.0