Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)

CSS 'background-position-y' Property Explained

Est. Reading: 1 minute
Updated: April 4, 2024

The CSS 'background-position-y' property specifies the vertical position of a background image within an element. It controls the y-coordinate (top to bottom) placement of the background image, allowing for precise alignment of the image within the vertical space of an element.

CSS 'background-position-y' Property Examples

See the Pen CSS 'background-position-y' Property by Webzstore (@webzstore) on CodePen.

The 'background-position-y' property offers detailed control over the vertical placement of background images within elements. It is indispensable for designers seeking to achieve precise visual effects and alignments. It is a crucial tool in creating visually compelling web designs.

Browser Support For 'background-position-y' Property

FirefoxSafariChromeMicrosoft EdgeOpera
49.01.0
15.4
1.0
(with two value syntax - Not supported)
12.0
(with two value syntax - Not supported)
15.0
(with two value syntax - Not supported)

CSS Syntax of the 'background-position-y' Property

background-position-y: value | initial | inherit;

Usage of the 'background-position-y' Property

Use 'background-position-y' when you want to adjust the vertical alignment of an element's background image without influencing its horizontal position. This property is useful for aligning background images to the top, center, or bottom of an element, or for specifying their vertical position with units such as pixels or percentages, enhancing the design's visual appeal and alignment.

Property Values of the 'background-position-y' Property

  • Value: Defines the vertical position of the background image using keywords (top, center, bottom), percentages (e.g., 50%), or exact measurements (e.g., 20px).
  • Initial: Resets the 'background-position-y' to its default value, effectively aligning the background image to the top of the element.
  • Inherit: The element inherits the 'background-position-y' value from its parent element.

Ryan Parker

Ryan has been a standout in digital marketing since 2010. He's the go-to person for getting businesses noticed online, with over 300 projects under his belt—these range from helping local business owners to big online stores. As the Head of Digital Marketing at Webzstore Solutions, Ryan knows all the tricks to make companies shine on the internet. He's excellent at using the latest tech and smart strategies to get results. Ryan is all about making businesses grow and reach more people online.

chevron-down