CSS overflow Property
Example
.example1 {
overflow: scroll;
}
.example2 {
overflow: hidden;
}
.example3 {
overflow: auto;
}
.example4 {
overflow: clip;
}
.example5 {
overflow: visible;
}
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Meaning
The overflow property determines an element’s behavior when its content doesn’t fit into the space defined by the element’s other properties.
Default value: | visible |
Inherited: | No |
Animatable: | No |
Version: | CSS2 |
JavaScript syntax: |
|
Standard Syntax
overflow: visible|hidden|clip|scroll|auto|initial|inherit|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
visible | This is default value. The overflow is not clipped. It renders outside the element's box. |
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 | A scroll-bar should be added to see the rest of the content. |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
overflow: visible;
}