CSS FlexboxLesson #177
Flexbox Justify Content
The `justify-content` property
CSS justify-content Property
The justify-content property
aligns the flex items along the main-axis (horizontally).
This property can have one of the following values:
center
flex-start(default)
flex-end
space-around
space-between
space-evenly
Example
Example Code
css.flex-container {
display: flex;
justify-content: center;
}Example
Example Code
css.flex-container {
display: flex;
justify-content: flex-start;
}Example
Example Code
css.flex-container {
display: flex;
justify-content: flex-end;
}Example
Example Code
css.flex-container {
display: flex;
justify-content: space-around;
}Example
Example Code
css.flex-container {
display: flex;
justify-content: space-between;
}Example
Example Code
css.flex-container {
display: flex;
justify-content: space-evenly;
}Interactive Code Examples
CSS Example 1
cssInteractive runnable CSS example from EA Academy.
Live Output Preview:
CSS Example 2
cssInteractive runnable CSS example from EA Academy.
Live Output Preview:
CSS Example 3
cssInteractive runnable CSS example from EA Academy.
Live Output Preview:
CSS Example 4
cssInteractive runnable CSS example from EA Academy.
Live Output Preview:
CSS Example 5
cssInteractive runnable CSS example from EA Academy.
Live Output Preview:
CSS Example 6
cssInteractive runnable CSS example from EA Academy.
Live Output Preview: