XML technologies / CSS / Advanced websites with CSS / CSS property reference / background-position-x, background-position-y
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The properties background-position-x and background-position-y are not part of the CSS specification and are interpreted only by Internet Explorer! They independently set vertical (Y-axis) and horizontal (X-axis) positioning of an element. Using them makes sense only with Dynamic HTML for Internet Explorer.
Inherited: no
See also: background-position
Values
Like background-position, both properties accept measurements, percentages and the constants in the table Value constants for background-position.
Default value: 0
Compatibility
CSS version: not part of the CSS standard
Supported only by Internet Explorer 4 and later.
Example
The following rule centres the background image horizontally and positions its top edge 20 pixels below the top of the body element:
body {
background-position-x: center;
background-position-y: 20px;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg