HTML DOM scrollLeft Property Supported Browsers

The browser supported by the scrollLeft property are listed below:



HTML DOM scrollLeft Property

HTML DOM scrollLeft property is used to return or set the number of pixels an element i.e. scrolled horizontally. If the content of the element doesn’t generate a scroll bar, then its scrollLeft value is 0; 

Syntax:

  • It returns the scrollLeft property.
element.scrollLeft
  • It is used to set the scrollLeft property.
element.scrollLeft = value

Where value specifies the number of pixels the element’s content is scrolled horizontally. 

Note: 

  • Its value can’t be negative.
  • If the value specified is greater than the maximum scroll amount, the value is set to a maximum number.

Similar Reads

HTML DOM scrollLeft Property Examples

Example: In this example, we will use the scrollLeft property....

HTML DOM scrollLeft Property Use Cases

...

HTML DOM scrollLeft Property Supported Browsers

...