Item alignment
Properties to align an individual item inside its own cell.
- justify-self: aligns an item horizontally in its cell.
- align-self: aligns an item vertically in its cell.
- place-self: shorthand to combine justify-self and align-self.
- Possible values:
- stretch: The item stretches to fill the whole cell along that axis (default).
- start: Aligns to the start of the axis (left in horizontal, top in vertical).
- center: Centers along the axis.
- end: Aligns to the end of the axis (right in horizontal, bottom in vertical).
Example
In this dynamic example, we can see the different alignments of an item within its own cell using justify-self and align-self.
ResultLive
html
css