Overflow Property in CSS
Overflow Property
Every element on the webpage is a box. If the height of the box is not set, the height of that box will automatically grow to accommodate the content. The CSS overflow property specifies behavior that occurs when an element's content overflows the element's box.
Syntax:-
Its syntax is:-
< style >
element{
overflow: visible| hidden| clip| scroll| auto| initial| inherit;
}
< /style >
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. |