Aligning Flex Elements to Parent in CSS
The space-between value specified in the justify-content property allows you to distribute elements evenly around the parent. The distance between them is calculated automatically. The first element will be aligned to the left edge, and the last one to the right.
Let's look at an example:
.parent {
display: flex;
justify-content: space-between;
}
Result of code execution: