CSS Background-Position Property

CSS 1

CSS 2

CSS 3

Yes Yes Yes

Description

Used to specify the position of a background image.

Syntax

background-position: [value];

Possible values

  • [percentage]
  • [length]
  • inherit
  • top
  • right
  • bottom
  • left
  • center
  • [combination] ie top left

Initial Value

0% 0%

Applies To

All elements

Inherited

No

Media

Visual

Example

body {background-image: url(/img/graphic.jpg) top center;}

body {
  background-image: url(/img/graphic.jpg);
  background-repeat: no-repeat;
  background-position: 30% 80%;
}


View All CSS Properties