Aug 22, 2024
display: flex;
to initiate a Flexbox layout.flex-start
: Align items to the start (left side).flex-end
: Align items to the end (right side).center
: Center items along the main axis.space-between
: Space between items, first and last touch container edges.space-around
: Equal space around items, first and last don’t touch edges.space-evenly
: Equal space between all items.flex-start
: Align items to the top.flex-end
: Align items to the bottom.center
: Center items vertically.row
: Default, left to right.row-reverse
: Right to left.column
: Top to bottom.column-reverse
: Bottom to top.gap: 20px;
wrap
: Allows items to wrap onto the next line.nowrap
: Prevents wrapping, items shrink together.space-between
, space-around
, flex-start
, flex-end
, center
.flex-grow
: Allows items to grow to fill available space.flex-shrink
: Allows items to shrink when necessary.align-items
property for individual flex items:
align-self: flex-end;
for one item while others follow the general rule.justify-content
and align-items
.flex-wrap
flex-grow
and flex-shrink
.display: grid; place-content: center;
instead of multiple Flexbox lines.End of Notes