scrollLeftscrollLeft*
*Contents  *Index  *Topic Contents
*Previous Topic: scrolling
*Next Topic: scrollTop

scrollLeft

Description

Sets or retrieves the distance, in pixels, between the left edge of the element and the leftmost portion of the element that is currently visible in the window. This is equal to the horizontal distance that the content of the element has been scrolled.

Syntax

object.scrollLeft[ = scrollLeft]

Settings

This read-write property is always a nonnegative integer. Although it can be set to any positive or negative value, the property is set to zero if the assigned value is less than zero, and is set to the value of scrollWidth if the assigned value is greater than this. The default value is zero.

This property is always zero for elements that do not support scroll bars. For these elements, setting the property has no effect.

Remarks

For more information on how to access the dimension and location of elements on the page through the document object model, see Measuring Element Dimension and Location.

Applies To

BODY, BUTTON, DIV, FIELDSET, FRAME, IFRAME, IMG, MARQUEE, SPAN, TEXTAREA

See Also

scrollHeight, scrollTop, scrollWidth


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