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;
}
Related Flexbox job interview questions
What CSS rule is used to change the flow of flex container items to "from top to bottom" when text of the document flows from left to right?
CSSFlexbox JuniorWhat CSS rule is used to change the flow of flex container items to "from left to right" when text of the document flows from left to right?
CSSFlexbox JuniorHow can you make flex container items that flow from left to right to fill all space from top to bottom?
CSSFlexbox JuniorWhat is the CSS property align-items used for and what values can it have?
CSSFlexbox JuniorWhat is a cross axis in Flexbox?
CSSFlexbox Junior