Help Center

Local Navigation

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.

Values

Value

Description

x_position [ y_position ]

This value is a whitespace-separated pair of values that specify the absolute distance from the padding edge at which an image is positioned. These values can be integers 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.

If only one value is specified, then y_position is assumed to be 50%.

x% [ y% ]

This value is a whitespace-separated pair of values that specify 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.

If only one value is specified, then y% is assumed to be 50%.

keyword_position

This value is a whitespace-separated pair of keyword values that specify the relative position of the image within the background. The first value specifies the vertical position; the second value specifies the horizontal position.

If only one value is specified, the second is assumed to be center.

Valid keyword values include:

  • top left
  • top center
  • top right
  • center left
  • center center
  • center right
  • bottom left
  • bottom center
  • bottom right

Index


Was this information helpful? Send us your comments.