Javascript Reference
Categories: STYLE

javascript STYLE overflowX, overflowY

@Jan. 25, 2010, 7:31 a.m.
overflowX, overflowY Firefox/Netscape/NN n/a IE 5(Win) Chrome/Safari/DOM n/a  

 

Read/Write  

Specify how a positioned element should treat content that extends beyond the horizontal (overflowX) or vertical (overflowY) boundaries established in the style sheet rule.

 
Example
 
document.getElementById("myDiv").style.overflowX= "scroll";
 
Value

Any of the following constants as a string: auto | hidden | scroll | visible.

 
Default

visible

Under moderation.
kwsieobb - 2017-06-19
[Paul S: There should be no space between overflow and X, should read overflowX.Also, for those who ...]
Thank you. Updated.
javascript manual - 2010-01-25
There should be no space between overflow and X, should read overflowX.

Also, for those who want to add a vertical scrollbar to your webpage like in IE, have this line of code after your page is loaded, like at the bottom of your html file:

document.body.style.overflowY = "scroll";
Paul S - 2010-01-24

Powered by Linode.