Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. overflow-y

overflow-y

Specifies how overflowing content is displayed along the y-axis (vertical direction).

Sample Code

div.test { overflow-y: visible;}
div.test1 { overflow-y: hidden;}
div.test2 { overflow-y: scroll;}
div.test3 { overflow-y: auto;}

Available Values

ValueDescription
visibleContent overflows and is displayed. This 'visible' is the initial value.
hiddenThe overflowing part is not displayed.
scrollThe overflowing part becomes scrollable.
autoLeaves the display of overflowing content to the browser. In most browsers, this behaves the same as 'scroll'.

Browser Display Result

<div style="overflow-y: visible; border: solid 1px red; width: 200px; height: 100px; margin: 0 auto;">This is a div element with a width of 200px and height of 100px (red border). The overflowing part is displayed as-is. Text text text text text text text.</div>

<div style="overflow-y: hidden; border: solid 1px red; width: 200px; height: 100px; margin: 0 auto;">This is a div element with a width of 200px and height of 100px (red border). The overflowing part is not displayed. Text text text text text text text.</div>

<div style="overflow-y: scroll; border: solid 1px red; width: 200px; height: 100px; margin: 0 auto;">This is a div element with a width of 200px and height of 100px (red border). The overflowing part becomes scrollable. Text text text text text text text.</div>

<div style="overflow-y: auto; border: solid 1px red; width: 200px; height: 100px; margin: 0 auto;">This is a div element with a width of 200px and height of 100px (red border). In most browsers, the overflowing part becomes scrollable. Text text text text text text text.</div>

Browser Compatibility

Chrome Chrome
1+
Firefox Firefox
3.5+
2 and earlier ×
Safari Safari
3+
2 and earlier ×
Edge Edge
12+
Supported in all versions
IE IE
11
10
9
8
7
6
Opera Opera
9.5+
8 and earlier ×
iOS Safari iOS Safari
1+
Android Android Browser
4.4+
3 and earlier ×
Chrome Android Chrome Android
Latest
Same support as desktop
Firefox Android Firefox Android
Latest
Same support as desktop

※ Version data is based on MDN / Can I Use.

Details

Specifies how overflowing content is displayed along the y-axis (vertical direction).

In most browsers, there is no visual difference between specifying 'auto' and 'scroll'.

The 'overflow-y' property was originally added as an IE-proprietary property, but it can now be used in virtually all browsers. However, since it originated as an IE-specific feature, thorough cross-browser testing is recommended.

If you find any errors or copyright issues, please .