sOverflow String that specifies or receives one of the following values:visible Default. Content is not clipped, and scroll bars are not added.
scroll Content is clipped, and scroll bars are added even if the content does not exceed the dimensions of the object.
hidden Content that exceeds the dimensions of the object is not shown.
auto Content is clipped, and scrolling is added only when necessary.
The property is read/write. The property has a default value of visible. The cascading style sheets (CSS) attribute is not inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft?Internet Explorer 5. For more information, see Dynamic Properties.
Remarks
The default value for the body element is auto.
Setting the overflow property to hidden on a TEXTAREA object hides its scroll bars.
The default value for the TABLE element is hidden.
As of Microsoft?Internet Explorer 5, the TD element supports the overflow property, with a default value of hidden, if the tableLayout property for the parent TABLE is set to fixed. In a fixed table layout, content that exceeds the dimensions of the cell is clipped if the overflow property is set to either hidden, scroll, or auto. Otherwise, setting the value of the overflow property to visible causes the extra text to overflow into the right neighboring cell (or left if the direction property is set to rtl), continuing until the end of the row.
Setting the overflow property to visible causes the content to clip to the size of the window or frame that contains the object.
This property is available on the Macintosh?platform as of Internet Explorer 5.
Example
The following examples use the overflow attribute and the overflow property to manage content of the object.
This example uses an inline style to automatically adjust itself to overflowing content when the page is loaded.
<DIV ID=oDiv STYLE="width: 200px; height: 200px; overflow: auto;">
:
</DIV>
This example allows the user to dynamically change the overflow property of a DIV object by choosing one of the possible overflow values from a SELECT object.
<SCRIPT>
function SetOverflow(o, sValue)
{
o.style.overflow = sValue;
}
</SCRIPT>
<DIV ID="div1"
STYLE="font-size:18pt;background-color:yellow;height:50px;width:75px">
The quick brown fox jumped over the lazy dog.
</DIV>