Menu Samaritan's Purse

OBJECT-POSITION

The object-position property determines the alignment of the replaced element inside its box.

SYNTAX

CSS

object-position: value;

JS

object.style.objectPosition = "value";

VALUES

<'object-position'> = <position>
<position> = [ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]
left

Left.

center

Center.

right

Right.

top

Top.

bottom

Bottom.

<length-percentage> = [ <length> | <percentage> ]
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

INITIAL

50% 50%

EXAMPLES

BOTTOM

CENTER

LEFT

LENGTH

PERCENTAGE

RIGHT

TOP

JS

INTERNAL

object-fit

EXTERNAL

World Wide Web Consortium (W3C)