screenTop property (window)
Returns an integer value that indicates the vertical position of the top side of the browser's client area, relative to the top side of the screen.
- To get the horizontal position of the left side of the browser's client area, use the screenLeft property.
- If you need the size of the client area, use the clientWidth and clientHeight properties of the html element.
- To get the size and the top-left corner of the browser window, use the outerWidth, outerHeight and the screenX, screenY properties.
If you need information about the dimensions of the screen, use the screen object.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Integer that represents the y-coordinate of the top side, in pixels.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the screenTop property:
Did you find this example helpful?
User Contributed Comments