CSS overflow Property
CSS overflow Property
The overflow property is used to define what should happen if content overflows an element box. It specifies whether to clip content or to add scrollbars when an element content is too big to fit in a specified area. It only works with block elements.
Default Value:-
Its default value is visible.
Syntax:-
Its syntax is:- overflow: visible | hidden | clip | scroll | auto | initial | inherit;
Further Explanation:-
Value | Description |
---|---|
visible | The overflow is not clipped. |
hidden | The overflow is clipped, and the rest of the content will be invisible. |
clip | The overflow is clipped, and the rest of the content will be invisible. |
scroll | The overflow is clipped, but a scroll bar is added to see the rest of the content |
auto | If overflow is clipped, a scroll bar should be added to see the rest of the content |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |