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 background positionY assignments myStyle.backgroundPosition = "top"; myStyle.backgroundPosition = "10"; myStyle.backgroundPosition = "50%"; myStyle.backgroundPosition = "0";
See also: | Measurement units, style.background |
Prev | Home | Next |
style.backgroundPositionX | Up | style.backgroundRepeat |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |