Web4College

CSS place-self property

src

Description

CSS place-self property places an element horizontally and vertically. It is a shorthand property of align-self and justify-self.

Syntax

place-self : align-self   justify-self

Property values

align-self

autoDefault

It stretches out the element vertically to fill the width of container completely.

align-self: auto;
Try it

baseline

It aligns the element on the baseline.

align-self: baseline;
Try it

center

It aligns the content at the middle of cotainer.

align-self: center;
Try it

stretch

It stretches the element so as fill the width of container completely.

align-self: stretch;
Try it

flex-start

flex-start aligns the current element at the start of flex container.

align-self: flex-start;
Try it

flex-end

flex-end aligns the current element at the end of the flex container.

align-self: flex-end;
Try it

justify-self

autoDefault

It stretches out the element vertically to fill the width of container completely.

justify-self: auto;
Try it

baseline

It aligns the element on the baseline.

justify-self: baseline;
Try it

center

It aligns the content at the middle of cotainer.

justify-self: center;
Try it

stretch

It stretches the element so as fill the width of container completely.

justify-self: stretch;
Try it

flex-start

flex-start aligns the current element at the start of flex container.

justify-self: flex-start;
Try it

flex-end

flex-end aligns the current element at the end of the flex container.

justify-self: flex-end;
Try it

Applicable to

It applies to block-level boxes, absolutely-positioned boxes, and grid items.