The object-positionCSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background.
You can adjust how the replaced element's object's intrinsic size (that is, its natural size) is adjusted to fit within the element's box using the object-fit property.
Try it
Syntax
css
/* Keyword values */object-position: top;object-position: bottom;object-position: left;object-position: right;object-position: center;/* <percentage> values */object-position: 25% 75%;/* <length> values */object-position: 0 0;object-position: 1cm 2cm;object-position: 10ch 8em;/* Edge offsets values */object-position: bottom 10px right 20px;object-position: right 3em bottom 10px;object-position: top 0 right 10px;/* Global values */object-position: inherit;object-position: initial;object-position: revert;object-position: revert-layer;object-position: unset;
The first image is positioned with its left edge inset 10 pixels from the left edge of the element's box. The second image is positioned with its right edge flush against the right edge of the element's box and is located 10% of the way down the height of the element's box.