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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access