background-position-x
Widely availableSince 201697% of users
Specifically controls the horizontal (left-to-right) position of a background image. This is useful when you want to change only the horizontal position via hover or animation without touching the vertical position.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyClassic, with newer partsIt has worked everywhere since September 2016, and it keeps getting newer values.
Newer parts of background-position-x
Side-relative values (such as left 10%)Baseline Jan 2026
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
0%- Inherited
- No
- Applies to
- all elements
- Animation type
- repeatableList
Quick example
.banner {
background-image: url('pattern.png');
/* Precisely moves the pattern 50px from the left */
background-position-x: 50px;
}Values
centerleftrightx-startx-endbackground-position-x browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2016.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
1+
49+
1+
12+Mobile
18+Android
49+Android
1+iOS