style.backgroundPositionY (Property)

The Y-coordinate of the background image grid position.

Availability:

CSS level - Proposed
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myStyle.backgroundPositionY
CSS syntax:background-position-y: aValue
Argument list:aValueAn Y-coordinate value

This property defines the vertical coordinate of the reference position for the background image relative to the top edge of the extent rectangle containing the styled element. The positioning of the image includes the padding space around the styled element.

Unlike the backgroundPosition property, the default measurement units for this property are pixels. This is the most accurate means of positioning background images. You can also use the value "top" to equate symbolically to the value 0.

Example code:

   // Example background positionY assignments

   myStyle.backgroundPosition = "top";

   myStyle.backgroundPosition = "10";

   myStyle.backgroundPosition = "50%";

   myStyle.backgroundPosition = "0";

See also:Measurement units, style.background