CSS3 overflow-y property
Example
If it overflows the element's content area, clip the content at the top/bottom edges of the div element:
div
{
overflow-y:hidden;
}
Try it »
Browser support
The numbers in the table indicate the first browser version that supports this property.
A number immediately before -webkit-, -ms-, or -moz- indicates the first browser version that supports that prefixed property.
| property | |||||
|---|---|---|---|---|---|
| overflow-y | 4.0 | 9.0 | |||
| 8.0 -ms- | 3.5 | 3.0 | 9.5 |
Property definition and usage
The overflow-y property specifies whether to clip the content at the top/bottom edges if it overflows the element's content area.
**Note:** Useoverflow-xproperty 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 | Clip the content - no scrolling mechanism is provided. |
| scroll | Clip the content - a scrolling mechanism is provided. |
| 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. |