Name
backgroundPositionX, backgroundPositionY — NN n/a IE 4 DOM n/a
Synopsis
Read/Write
Top and left locations of the background image relative to the element’s content region (plus padding). These properties are not properly connected in Internet Explorer 4 for the Macintosh.
Example
document.all.div3.style.backgroundPositionX = "20" document.all.table2.style.backgroundPositionY = "10"
Value
You should be able to specify percentage values, which are the
percentage of the block-level element’s box width and height
(respectively) at which point the image (or repeated images) begins.
Setting percentage values, however, does not always work in IE 4 for
Windows (and it doesn’t work at all on the Mac), even though
they are returned as the default value units. You are safest with
pixel values. None of the allowed constants except
top
and left
are recognized.
Default
0
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.