CSS3 overflow-yProperty
Example
If it overflows the element's content area - clips the div element's top/bottom edge content:
div
{
overflow-y:hidden;
}
{
overflow-y:hidden;
}
Try it Yourself »
Browser Support
Numbers in the table indicate the first browser version that supports this property.
Numbers immediately preceding -webkit-, -ms-, or -moz- indicate the first browser version that supports the prefixed property.
| Property | |||||
|---|---|---|---|---|---|
| overflow-y | 4.0 | 9.0 8.0 -ms- |
3.5 | 3.0 | 9.5 |
Attribute definition and usage instructions
The overflow-y property specifies whether to clip the top/bottom edge content if it overflows the element's content area.
Tip:Usageoverflow-xAttribute to determine whether the left and right edges are clipped.
| Default value: | visible |
|---|---|
| Inherited: | no |
| version: | CSS3 |
| JavaScript Syntax: | object.style.overflowY="scroll" |
Syntax
overflow-y: visible|hidden|scroll|auto|no-display|no-content;
| Value | Description |
|---|---|
| visible | Content is not clipped and may be displayed outside the content box. |
| hidden | Content is clipped - no scrolling mechanism is provided. |
| scroll | Clipped content - provides a scrolling mechanism. |
| auto | If the box overflows, a scrolling mechanism should be provided. |
| no-display | If the content does not fit in the content box, the entire box is removed. |
| no-content | If the content does not fit in the content box, the entire content is hidden. |