overflow

Browser Internet Explorer Netscape Opera Safari Firefox
Version 5.5 6.0 7.0 8.0 8.0 9.0 7.0 8.0 9.2 9.5 1.3 2.0 3.1 1.5 2.0 3.0
Supported Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Short information
CSS CSS2
Default value visible
Inherited No
Applied To block and replaceable elements
HTML analog No
Reference to specification http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow

Description
This feature operates display of the block element content, if it is not located and leaves for area of the specified sizes entirely.

Syntax
overflow: auto | hidden | scroll | visible

Arguments
visible
All element content is displayed even outside of the determined height and width.
hidden
The inside area is displayed, the rest will be cut.
scroll
Scrolls are added always.
auto
Scrolls are added only if it is necessary.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
  <title>overflow</title>
  <style type="text/css">
   .layer {
    overflow: scroll; /* Add scrolling bands */
    width: 300px; /* Block width */
    height: 150px; /* Block height */
    padding: 5px; /* Areas around the text */
    border: solid 1px black; /* Frame parameters */
   } 
  </style>
 </head>
 <body> 
 
  <div class="layer">
   <h2>Duis te feugifacilisi</h2>
   <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem 
    nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. 
    Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit 
    lobortis nisl ut aliquip ex ea commodo consequat.</p>
  </div> 
 
 </body>
</html>

The result of this example is shown on the figure 1


Object model

[window.]document.getElementById("elementID").style.overflow
Remark
Browser Internet Explorer also supports the parameter "overflow-x", which images the scrolling band across and "overflow-y" responsible for the vertical scrolling band. Arguments are the same as for "overflow".
IT virtualization
Network Virtualization
Server Virtualization
Server Virtualization Benefits