Flexbox quiz (align-items)

The question is “What is the align-items property used for?”

I answered “to align flex items horizontally and vertically” but the correct answer is “To align flex items vertically”

From what I understand, if flex-direction is row or row-reverse, then it is for aligning flex items vertically but if flex-direction is column or column-reverse then it is “horizontally”

Please explain or share your thoughts about this.

1 Like

It seems you have a good understanding here.

Maybe the wording of the question should have specified “with a default flex-direction” to make it clearer. The default is row and would eliminate the horizontal options.

Side note: I found this to be a valuable visual reference for flexboxes: A Complete Guide to Flexbox

3 Likes