Skip to Content


CSS Reference / background-position

background-position

Sets the starting position of a background image. This property may only be applied to block-level elements and replaced elements. A replaced element is one for which only the intrinsic dimensions are known; HTML replaced elements include IMG, INPUT, TEXTAREA, SELECT, and OBJECT.

Values:

  • top left
  • top center
  • top right
  • center left
  • center center
  • center right
  • bottom left
  • bottom center
  • bottom right
  • x-% y-%
  • x-pos y-pos

Examples:

  1. background-position: top left;
  2. background-position: 10% 50%;
  3. background-position: 10px 20px;

Browser support:

  • Internet Explorer 4+
  • Netscape 6+
  • Opera 3.6+

Related properties:

back to list



Search

Sponsors

Logo design for $149

Advertise here