How would you use space-between and what do you know about it?

Experience Level: Junior
Tags: CSSFlexbox

Answer

The space-between is a value of the justify-content property or the align-content property.

The justify-content: space-between makes the flex items to be equally distributed on the main axis in such a way they have the same amount of space between each of them and there is no space on the outer sides of the first and last flex item.

The align-content: space-between makes the flex items to be equally distributed on the cross-axis in such a way they have the same amount of space between each of them and there is no space on the outer sides of the first and last flex item.

.container {
  display: flex;
  justify-content: space-between;
}

.container2 {
  display: flex;
  align-content: space-between;
}

Comments

No Comments Yet.
Be the first to tell us what you think.
Flexbox
Flexbox

Are you learning Flexbox ? Try our test we designed to help you progress faster.

Test yourself
25 Flexbox questions that will help you to nail your job interview
25 Flexbox questions that will help you to nail your job interview

Are you learning Flexbox ? Try our test we designed to help you progress faster.

Test yourself