The
overflow
property specifies what happens to the content of a block-level element when the content doesn't not fit into the space allocated for the element.
Properties | Description |
---|
visible | the content is not clipped and will be rendered outside of the box element |
hidden | the content is clipped and cannot be scrolled |
scroll | the content is clipped but can be scrolled |
auto | the value is browser dependent |
inherit | the value is inherited from the parent. |
There are other two
overflow
properties which are specific to x or y axis.
Properties | Description |
---|
overflow-x | specify an overflow behavior along x-axis only |
overflow-y | specify an overflow behavior along y-axis only |
Note
If the overflow property is not set, the default value visible
will be set.