Style overflowX Property
Example
Provide horizontal scrolling if the text overflows the element's content area:
document.getElementById("myDIV").style.overflowX="scroll";
Try it »
Definition and Usage
The overflowX property specifies whether to clip the left/right edges of the content - if the content overflows the element's content area.
**Tip:** Please use overflowY Property to determine the clipping of the top/bottom edges.
Browser support

All major browsers support the overflowX property.
**Note:** The overflowX property has no effect in IE8 and earlier versions.
Syntax
Return the overflowX property:
object
.style.overflowX
Set the overflowX property:
object
.style.overflowX="visible|hidden|scroll|auto|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| visible | Content is not clipped and may be displayed outside the content box. |
| hidden | Content is clipped, and no scrolling mechanism is provided. |
| scroll | Content is clipped, and a scrolling mechanism is provided. |
| auto | If the box overflows, a scrolling mechanism should be provided. |
| initial | Sets this property to its default value. See initial. |
| inherit | Inherits this property from its parent element. See inherit. |
Technical Details
| Default value: | visible |
|---|---|
| Return Value: | A string representing the element's overflow-x property. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:overflow-x property
The Style object