CSS3 overflow-x property
Example
If it overflows the element's content area, clip the content at the left/right edges of the div element:
div
{
overflow-x: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-x | 4.0 | 9.0 | |||
| 8.0 -ms- | 3.5 | 3.0 | 9.5 |
Property definition and usage
The overflow-x property specifies whether to clip the content at the left/right edges if it overflows the element's content area.
Tip: Use the overflow-y property to determine whether the top and bottom edges are clipped.
| Default value: | visible |
|---|---|
| Inherited: | no |
| Version: | CSS3 |
| JavaScript syntax: | object.style.overflowX="scroll" |
Syntax
overflow-x: 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. |