Skip to content
Product and web UIguide

How to align a bottom-heavy icon inside a thumbnail

By SkeuDesign Editorial Team1 min read

Answer in brief

Set object-position when fitted artwork should sit against a particular edge of its box. The property positions the image rectangle, including any transparent margins.

Align a shelf of badges

Fit a wide badge inside a tall frame with contain and set object-position to center bottom. Compare the baseline across several frames. If only one badge floats, examine its lower transparent margin.

Identify padding baked into the file

Place a temporary contrasting fill behind the image element and inspect the original with a transparency grid. A strip of transparent pixels under the badge remains inside the fitted image even when its box touches the shelf. Crop that strip in the source when the same baseline is required across the library.

Sources

  1. [1] object-position CSS property - CSS — MDN Web Docs, accessed November 23, 2026

Frequently asked questions

Will object-position move an image that fills the box exactly?

With no leftover space, percentage positions have no visible effect along that axis. Check the fitted image dimensions first.