Bootstrap 5 Basic
Bootstrap 5 Flexbox
Flex items in CSS are the child elements of a flex container.
Specifies the order of the flex item within the container.
order-{size?}-{value}
order
: Indicates flex order.size
(optional): Responsive breakpoint (e.g., sm
, md
, lg
, xl
, xxl
):value
(optional): Responsive breakpoint (e.g., 0
, 1
, 2
, 3
, 4
, 5
):Example:
.order-1
.order-sm-1
.order-md-1
.order-lg-1
.order-xl-1
.order-xxl-1
Try it yourself
flex-{size?}-{type}-{value}
flex
: Indicates flex.size
(optional): Responsive breakpoint (e.g., sm
, md
, lg
, xl
, xxl
):type
: grow | shrink:value
: size (e.g., 0
, 1
):Example:
.flex-{grow | shrink}-0
.flex-sm-{grow | shrink}-1
.flex-md-{grow | shrink}-1
.flex-lg-{grow | shrink}-1
.flex-xl-{grow | shrink}-1
.flex-xxl-{grow | shrink}-1
Try it yourself
Try it yourself
Align an individual flex item vertically.
align-self-{size?}-{type}
align-self
: Indicates flex align self.size
(optional): Responsive breakpoint (e.g., sm
, md
, lg
, xl
, xxl
):type
: Defines the direction of the margin (e.g., start
, end
, center
, baseline
,stretch
).Example:
.align-self-start
.align-self-sm-start
.align-self-md-start
.align-self-lg-start
.align-self-xl-start
.align-self-xxl-start
Try it yourself