The background-position property sets the starting place of each background-image inside the area chosen by background-origin. One value, two values, or an edge offset can place the image. With several images, list positions with commas in the same order.
The initial value is 0% 0% (top left). The property is not inherited. It applies to every element, including ::first-letter and ::first-line. Pair it with background-repeat: no-repeat when you want to see one placed image instead of a tile.
Standard.
Not deprecated. Keywords, lengths, percentages, and edge offsets are Baseline. Logical keywords such as x-start, block-start, and inline-end are newer and still missing in some browsers.
Syntax
CSS Syntax
syntax.css
background-position:center | top left | 25% 75% | 20px 30px | bottom 10px right 20px | initial | inherit;
One value implies center for the other axis. With two lengths or percentages, the first is horizontal and the second is vertical. Separate multiple images with commas.
Values
Property Values
Value
Description
Try it
center
Centers the image in both axes. One keyword alone centers the other axis
One blue marker. Change background-position and watch where it sits in the box.
The marker does not repeat. Only its starting place changes.
Position
center
background-position: center
Code
CSS Examples
Each snippet adds only what background-position needs: an image, a sized box, and no-repeat so the mark is clear. Use Try It Yourself for a live editor.
Read left to right, then top to bottom.25% is the horizontal place. 75% is the vertical place.
Match points, not edges only. The point 25% across the image meets the point 25% across the box. The same idea applies for 75% on the vertical axis.
0% and 100% are the edges.0% 0% is top left. 100% 100% is bottom right. 50% 50% is center.
Size still matters. If the image were the same size as the box, a percentage would have no leftover space to slide. Here the circle is smaller, so the move is visible.
Example 3 — Edge Offsets
Anchor to an edge, then nudge inward with a length.
Name the edge first.bottom and right choose which edges the image sits against.
Offset after each edge.10px follows bottom, so the circle lifts 10px from the bottom. 20px follows right, so it moves 20px inward from the right.
Order of the pairs can swap.right 20px bottom 10px is the same placement. A bare length before the keyword, such as 20px right, is invalid.
Use this for padding from a corner. Plain bottom right sticks to the corner. The lengths leave a small gap from those edges.
Edge Cases & Pitfalls
If the image looks stuck, tiled, or unchanged, one of these is usually why.
repeat
Tiles hide a clear placement
The initial background-repeat is repeat. The starting place still applies, but copies fill the box. Use no-repeat when you want one image.
size
A full-size image ignores percentages
If background-size matches the box on an axis, that axis has no leftover space. A percentage then looks stuck. Use a length, or make the image smaller than the box.
order
20px right is invalid
A length or percentage that pairs with a keyword must follow that keyword: right 20px. Two keywords can swap (top left equals left top). Two lengths stay horizontal first, then vertical.
origin
Position is measured from background-origin
background-origin picks border-box, padding-box, or content-box. Changing the origin moves the same position value relative to a different box.
shorthand
The background shorthand resets position
A later background: #fff sets every background longhand, including background-position: 0% 0%. Set position after the shorthand, or include it in the shorthand.
Compatibility
Browser Support
background-position is a browser painting property. Node.js, Deno, and Bun do not apply it. Keywords, lengths, and percentages are older than edge offsets. Logical keywords such as x-start are newer.
✓ Baseline · Widely available since 2015
background-position
Keywords, lengths, percentages: every current browser and IE 4+. Multiple positions: IE 9+. Three- and four-value edge offsets: Chrome 25+, Firefox 13+, Safari 7+, IE 9+, Edge 12+.
99%Keywords and offsets
Google Chrome1+ · 25+ edge offsets
Full support
Mozilla Firefox1+ · 13+ edge offsets
Full support
Apple Safari1+ · 7+ edge offsets
Full support
Microsoft Edge12+
Full support
Opera3.5+ · 15+ edge offsets
Full support
Samsung Internet1+
Full support
Internet Explorer4+ · 9+ multi & offsets
Partial
background-positionWidely supported
Bottom line: Safe for keywords, lengths, percentages, and edge offsets in current browsers. Multiple background positions need Internet Explorer 9 or newer. Logical keywords such as x-start and block-start are still limited — prefer physical keywords on a normal page.
Remember
Key Takeaways
Role: place each background image inside the area from background-origin.
Values: keywords, percentages, lengths, or edge offsets such as bottom 10px right 20px.
Initial value:0% 0% (top left). It is not inherited.
See it clearly: use background-repeat: no-repeat when a single placed image is the goal.
One line:background-position chooses where the image starts — after you have an image, and usually after you turn off tiling.
Frequently Asked Questions
It sets where each background image starts inside the background positioning area. Keywords, percentages, lengths, and edge offsets all place that image. The initial value is 0% 0%, which is the top-left corner.
0% 0%, the same as left top. The image starts at the top-left of the area defined by background-origin. The property is not inherited.
A percentage lines up that point on the image with the same point on the box. 0% is the start edge of both. 50% centers. 100% lines up the end edges. If the image is the same size as the box, a percentage offset has no room to move.
background-origin chooses the box the image is measured against: border-box, padding-box, or content-box. background-position places the image inside that area.
background-repeat defaults to repeat. The position still applies, but copies fill the rest of the box. Set background-repeat: no-repeat when you want to see a single placed image.
Keywords, lengths, and percentages work in every current browser and in Internet Explorer 4 and newer. Multiple positions need Internet Explorer 9 or newer. Three- and four-value edge offsets need Chrome 25, Firefox 13, Safari 7, or Internet Explorer 9. This is a browser CSS property. Node.js, Deno, and Bun do not paint it.