Using flex-wrap and align-content

The flex-wrap property allows us to determine whether we are going to wrap our content to a second row or squeeze all the flex items into a single row; align-content determines the alignment of a row that is being wrapped to multiple lines, thus becoming multiple rows. They are basically best friends.

Get Mastering CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.