Flex items alignment

Can someone tell me what’s exactly the difference between justify-content and align-items? They also seem to take a lot of same values such as center, flex-end, 'flex-start etc.

The biggest difference is which axis these two make their alignments on. Justify-content is used when you want to align items on the main axis which is horizontally. Align-items is going to align items on the cross axis which is vertically

I think this will give you a better picture

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.