CSS overflow y Property
CSS overflow-y Property
The overflow-y property is used to define whether to clip the content and add a scroll bar or display overflow content of a block-level element when it overflows at the top and bottom edges.
Default Value:-
Its default value is visible.
Syntax:-
Its syntax is:- overflow-y: visible | hidden | scroll | auto | initial | inherit;
Further Explanation:-
Value | Description |
---|---|
visible | The content is not clipped, and it is rendered outside the top and bottom edges. |
hidden | The content is clipped but no scrolling is provided. |
scroll | The content is clipped and a scrolling mechanism is provided |
auto | Should cause a scrolling mechanism to be provided for overflowing boxes |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |