The background-position-y property sets the vertical starting place of each background-image. The place is measured inside the area from background-origin. Horizontal place stays as it is, or you set it with background-position-x.
Not deprecated. Keywords, lengths, and percentages are Baseline. Side-relative values such as bottom 20px are widely supported in current browsers. Logical keywords y-start and y-end are newer and still limited.
Syntax
CSS Syntax
syntax.css
background-position-y:top | center | bottom | 25% | 20px | bottom 20px | initial | inherit;
Separate multiple images with commas. The keyword comes before a side offset: bottom 20px, not 20px bottom.
One blue marker, kept horizontally centered. Change background-position-y and watch it move up and down.
Horizontal place stays center. Only the vertical place changes.
Vertical place
center
background-position-y: center
Code
CSS Examples
Each snippet adds only what background-position-y needs: an image, a sized box, and no-repeat so the mark is clear. Use Try It Yourself for a live editor.
Example 1 — Center Vertically
Place the marker in the vertical middle. Horizontal place stays center.
One axis only.25% is vertical. Horizontal place is still center from the other property.
Match points. The point 25% down the image meets the point 25% down the box.
Edges are 0% and 100%.0% is top. 100% is bottom. 50% is center.
The image must be shorter. If the image matched the box height, a percentage would have no room to slide. Here the circle is smaller, so the move is visible.
Example 3 — Side Offset
Anchor to the bottom edge, then nudge inward with a length.
Name the edge first.bottom chooses the bottom edge of the positioning area.
Offset after the edge.20px follows bottom, so the circle moves 20px upward from that edge.
Order matters.bottom 20px is valid. 20px bottom is not.
Use this for a gap from an edge. Plain bottom sticks to the edge. The length leaves a small inset.
Edge Cases & Pitfalls
If the vertical place looks wrong or resets, one of these is usually why.
override
background-position wins later
A later background-position or background rule overrides background-position-y. Set the longhand after the shorthand, or put the place inside the shorthand.
repeat
Tiles hide a clear placement
The initial background-repeat is repeat. Use no-repeat when you want one image so the Y place is obvious.
size
A full-height image ignores percentages
If background-size matches the box height, a percentage has no leftover space. Use a length, or make the image shorter than the box.
order
20px bottom is invalid
A side-relative value needs the keyword first: bottom 20px or top 25%. A bare length alone is measured from the top.
background-position-y is a browser painting property. Node.js, Deno, and Bun do not apply it. Keywords, lengths, and percentages are Baseline. Side-relative values and logical keywords have narrower history.
✓ Baseline · Widely available since 2016
background-position-y
Keywords, lengths, percentages: Chrome 1+, Firefox 49+, Safari 1+, Edge 12+, Opera 15+. Side-relative offsets such as bottom 20px: current Chromium, Firefox, and Safari. Logical y-start / y-end: limited.
98%Keywords and lengths
Google Chrome1+
Full support
Mozilla Firefox49+
Full support
Apple Safari1+
Full support
Microsoft Edge12+
Full support
Opera15+
Full support
Samsung Internet1+
Full support
Internet Explorer6+
Partial
background-position-yWidely supported
Bottom line: Safe for top, center, bottom, lengths, and percentages in current browsers. Firefox added the property in 49. Side-relative values such as bottom 20px are fine in current browsers. Prefer physical keywords over y-start / y-end on a normal page.
Remember
Key Takeaways
Role: set only the vertical place of each background image.
Values:top, center, bottom, percentages, lengths, or side offsets such as bottom 20px.
Initial value:0% (top). It is not inherited.
Override: a later background or background-position resets this longhand.
One line:background-position-y moves the image up and down — pair it with background-position-x when you also need left and right.
Frequently Asked Questions
It sets only the vertical place of each background image inside the area from background-origin. Horizontal place is unchanged, or controlled with background-position-x. The initial value is 0%, which is the top edge.
0%. That lines up the top edge of the image with the top edge of the positioning area. The property is not inherited.
background-position can set both axes in one declaration. background-position-y sets only the vertical axis. A later background or background-position rule overrides background-position-y.
Yes. Set vertical place with background-position-y and horizontal place with background-position-x when you want the axes in separate rules.
It is a side-relative value. The image aligns to the bottom edge, then moves 20px inward from that edge. top 25% works the same way from the top.
Keywords, lengths, and percentages are Baseline and widely available since 2016. Side-relative values such as bottom 20px have solid support in current browsers. Logical keywords such as y-start are newer and still limited. This is a browser CSS property. Node.js, Deno, and Bun do not paint it.