CSS overflow-y Property


CSS's overflow-y property specifies how content behaves when it overflows the top and bottom edges of a block-level element. Depending on the value of the overflow-y property, the content may be clipped, hidden, or a scrollbar displayed.

Syntax

Example

Preview

Property Values

Value Description
visible The content is not clipped and may appear outside of the content box. This is the default setting.
hidden The content is clipped, and there is no scrolling mechanism.
scroll The content has been clipped, and a scrolling mechanism has been provided.
auto For overflowing boxes, a scrolling mechanism should be provided.
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-y 4.0 1.5 3.0 9.0
8.0 -ms-
9.5