CSS property: background-position
Availability |
BlackBerry® Device Software version 3.8 or later |
Usage |
All elements |
Inherited |
No |
Default value |
0%0% |
If a background image has been specified, the background-position property specifies its initial position.
Property values
Value |
Description |
|
|---|---|---|
[ length | percentage | bottom | center | top ] | [ length | percentage | left | center | right ] |
This value is a whitespace-separated pair of values, the first specifying the distance from the left edge of the padding, and second the distance from the top of the padding. If only one value is specified, the second is assumed to be center, equivalent to a value of 50%. |
|
Value |
Description |
|
length |
This value specifies the absolute distance from the padding edge. The value can be an integer with the unit of measurement. For example, “10pt” or “6px”. Negative values are permitted. Possible units include pt, px, in, cm, pc, em, or ex. |
|
percentage |
This value specifies the relative distance from the padding edge. A value of 10% aligns the point 10% across the image to the point 10% across the padding area. |
|
bottom |
This value specifies that the bottom edge of the image is placed at the bottom edge of the padding. A value of bottom is equivalent to value of 100%. |
|
center |
When specified as the first value, this value specifies that the image is centered horizontally in the padding area. When specified as the second value, this value specifies that the image is centered vertically in the padding area. A value of center is equivalent to a value of 50%. |
|
left |
This value specifies that the left edge of the image is placed at the left edge of the padding area. A value of left is equivalent to a value of 0%. |
|
right |
This value specifies that the right edge of the image is placed at the right edge of the padding area. A value of right is equivalent to a value of 100%. |
|
top |
This value specifies that the top edge of the image is placed at the top edge of the padding area. A value of top is equivalent to a value of 0%. |
|
inherit |
This value specifies that the element inherits the background-position property of the containing element. |
|