Free online tools

CSS Object Position Calculator

Center a subject or keep it near a chosen point when an image is cropped to cover a frame.

Enter your values

This tool processes your input in your browser.

Result

Scale the image so it covers the frame

With cover, one scaled edge matches the frame and the other may be cropped. The original subject location is converted to the enlarged image coordinates.

Keep the whole frame covered

If positioning the subject exactly would expose empty space near an edge, the position saturates at 0% or 100%. The report shows the resulting focal point in the frame.

Frequently asked questions

Can I use object-fit contain with these values?

The calculation models cover. Contain keeps the full image visible and can leave space around it.