Specifies the position of a background image for an element.
Platform Support
IE | Netscape | Mozilla | Opera | Safari |
---|---|---|---|---|
4.0+ | 6.0+ | 1.0+ | 4.0+ | 1.0+ |
Usage
Example values: 50px 50px, 10% 5%, 2cm 4cm, 2cm 5%, center, etc.
Values
* | Specify a value for background-position not on this list. |
top | Top of the parent element or window. |
center | Center of the parent element or window. |
bottom | Bottom of the parent element or window. |
left | Left edge of the parent element or window. |
right | Right edge of the parent element or window. |
Remarks
If you do not specify one or more of the values top, center, bottom, left, or right
, you can also specify pixel values (px), percentage values (%), em, in,
cm, mm, pt, and pc.
Availability
W3C CSS2