CSS Overflow
The CSS overflow property controls how content is handled when it exceeds the size of its container.
For example, if the height or width of a box is set and the content inside cannot fit, the overflow property allows us to define how the content should behave. It can clip the content, display scrollbars to navigate through the overflowed content, or simply display the content without any special handling.
Input:-
Output:-
Value |
Description |
visible |
It specifies that overflow is not clipped. it renders outside the element's box. This is a default value. |
hidden |
It specifies that the overflow is clipped, and the rest of the content will be invisible. |
scroll |
It specifies that the overflow is clipped, and a scroll bar is used to see the rest of the content. |
auto |
It specifies that if overflow is clipped, a scroll bar is needed to see the rest of the content. |
inherit |
It inherits the property from its parent element. |
initial |
It is used to set the property to its initial value. |