What does the align-content CSS property do and when do you use it?

Experience Level: Junior
Tags: CSSFlexbox

Answer

The align-content property sets the alignment of the content on the cross axis within the flex container.

In other words, all the flex items (content) will be taken and will be pushed in some direction as a whole.

CSS

div {
  display: flex;
  flex-direction: row;
  align-content: flex-start; 
}

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