liveBook · Manning

Background-position

The CSS background-position property specifies the position of a background image within an element.

How 2 Manning books explain it

CSS in Depth, Second Edition

The CSS background-position property specifies the position of a background image within an element.

How it is used
Positions a background image within an element and clarifies two-value ordering alongside related visual properties.
How deep it goes
Explains the horizontal-then-vertical rule and its Cartesian rationale, but does not develop positioning edge cases or image-rendering behavior.
Examples
Uses 25% 75% for background positioning and 10px 2px for an analogous box-shadow coordinate example.
What you can do after
Apply background-position values by reading two measurements as horizontal x followed by vertical y.

Read how CSS in Depth, Second Edition explains background-position →

Web Design Playground, Second Edition

The CSS background-position property specifies the starting horizontal and vertical position of a background image within an element.

How it is used
Positions the starting point of a background image or its tiling within an element.
How deep it goes
Defines two-axis values, defaults, nine keyword combinations, and hero-image usage; defers additional length units to Chapter 7.
Examples
Uses nine keyword positions, a centered Toronto hero image, and custom bullet alignment.
What you can do after
Apply it via CSS to align background images, create a centered cover-style hero image, or position a custom bullet.

Read how Web Design Playground, Second Edition explains background-position →

Also covered in

Related concepts

Questions about background-position

What is background-position?

The CSS background-position property specifies the position of a background image within an element.

Which Manning books explain background-position?

CSS in Depth, Second Edition and Web Design Playground, Second Edition.

What should I know before learning background-position?

Manning books that teach background-position usually introduce no-repeat first.

What is background-position a kind of?

Background-position is a kind of style property. A style property is a named setting or interface attribute that specifies or exposes a presentation characteristic of an element or view.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.