overflowoverflow*
*Contents  *Index  *Topic Contents
*Previous Topic: margin-top
*Next Topic: padding

overflow

Description

Determines what to do when the element's content exceeds the height and width of the element.

By default, overflowing content is visible. This means the element does not observe its specified height and width. If the attribute is set to scroll, the content is clipped to the height and width specified on the element, and the overflowing content is accessible through scroll bars. If the attribute is set to hidden, the content of the element is clipped to the height and width of the element, and no scroll bars appear to access the hidden content. Applies to positioned elements.

Syntax

{ overflow: scroll | hidden | visible | auto }

Remarks

This attribute is not inherited.

For the TEXTAREA element, only the hidden value is valid. Setting the overflow to hidden on a TEXTAREA element hides its scrollbars.

Example

The following example illustrates this attribute.

<DIV STYLE="position:relative;height:100;width:100;      
      top:0;left:0;background-color:green;overflow:scroll">
put enough text in here that will take up more than 100 x 100 
pixels worth of space. View this, and you will see that you 
will need to use the scroll bars to see the content that won't 
fit within a 100 x 100 window.
</DIV>

Applies To

DIV, TEXTAREA, SPAN, FIELDSET

Scripting Property

overflow


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.