Class | Properties |
---|---|
.justify-content-start | justify-content: flex-start; |
.justify-content-center | justify-content: center; |
.justify-content-end | justify-content: flex-end; |
.justify-content-between | justify-content: space-between; |
.justify-content-around | justify-content: space-around; |
Usage
Start
Use .justify-content-start
to justify items against the start of the flex container’s main axis.
Center
Use .justify-content-center
to justify items along the center of the flex container’s main axis.
End
Use .justify-content-end
to justify items against the end of the flex container’s main axis.
Space between
Use .justify-content-between
to justify items along the flex container’s main axis such that there is an equal amount of space between each item.
Space around
Use .justify-content-around
to justify items along the flex container’s main axis such that there is an equal amount of space around each item.
Variants
By default, only responsive variants are generated for justify content utilities.
Responsive
To control the justification of flex content at a specific breakpoint, add a {screen}:
prefix to any existing justify content utility.
For example, use .md:justify-content-between
to apply the justify-content-between
utility at only medium screen sizes and above.
Hover-state
To include hover-state variants like .hover:justify-content-between
, add "justify-content"
to the $hover-variants
variable when recompiling your CSS:
$hover-variants: (
// ...
"justify-content",
);