CSS · Properties — CSS Backgrounds and Borders

background-position-x

The CSS background-position-x property. Initial value: 0%. Not inherited.

Syntax
background-position-x: [ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#

Example

Try it

Notes

Media: visual. Applies to: allElements. Computed value: listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin.

More in this group

background background-attachment background-origin background-position-y border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course