Entry
Can I control which scrollbars are provided, for example, horizontal, vertical or both?
Aug 13th, 2000 02:22
Rey Nuņez, http://www.w3.org/TR/REC-CSS2/visufx.html#overflow
CSS includes the overflow attribute, which can be used to set or
retrieve a block element's scroll behavior, that is, what should be
done when the object's content exceeds the specified height and/or
width of the object.
CSS syntax with possible values is:
selector { overflow: 'visible' | 'scroll' | 'hidden' | 'auto' }
where selector can be any valid HTML element, class, or id.
and in ECMA-compliant script (use variable= to retrieve, =value to set)
[variable =] object.style.overflow [= value]
IE4+ also include two other properties to control scrollbar behavior:
overflow-x and overflow-y, which use the same syntax and take the same
values as above.
For example:
div { overflow-x: 'auto'; overflow-y: 'hidden' }
will set the horizontal scroll behavior as needed, that is, scrollbars
appear when the object's content exceeds the specified width of the
object; but also will not show the vertical scrollbars even when the
content exceeds the object's specified height.
Please refer to
http://www.w3.org/TR/REC-CSS2/visufx.html#overflow
for details of this attribute's possible values.