Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining

scrollLeft property

Sets or retrieves the distance between the left edge of the object and the leftmost portion of the content currently visible in the window.


HRESULT value = object.put_scrollLeft( v);HRESULT value = object.get_scrollLeft(* p);

Property values

Type: long

the distance, in pixels.


Default value.


This property's value equals the current horizontal offset of the content within the scrollable range. Although you can set this property to any value, if you assign a value less than 0, the property is set to 0. If you assign a value greater than the maximum value, the property is set to the maximum value.

This property is always 0 for objects that do not have scroll bars. For these objects, setting the property has no effect.

When a marquee object scrolls vertically, its IHTMLElement2::scrollLeft property is set to 0.

For more information about how to access the dimension and location of elements on the page, see Measuring Element Dimension and Location with CSSOM in Internet Explorer 9.

See also




Community Additions

© 2015 Microsoft