This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

pageXOffset

Property of css/cssom/propertiescss/cssom/properties

Syntax

var result = element.pageXOffset;
element.pageXOffset = value;

Notes

Remarks

When you scroll a document horizontally, some content is moved outside the view of the display area. The pageXOffset property returns the difference between the first pixel in the content and the first pixel currently in view. The value of the pageXOffset property is negative when the base direction of a document is set to display content in right-to-left order. For more information, see W3C Tutorial: Creating HTML Pages in Arabic, Hebrew and Other Right-to-left Scripts.

Syntax

Standards information

See also

Related articles

CSSOM

Related pages

  • window
  • pageYOffset

Attributions