Using the align-self Flexbox property

Looks good, but what if I don't want all the flex items to be centered? I might prefer the h2 to be aligned to flex-start (in fact I do). The align-items is a property used on the flex container to control the cross axis alignment of all flex items. Another, flexbox property called align-self controls alignment along the cross axis but is a property used directly on flex items. This will help us aligning only our h2 to the left.

Let's create a new selector for the h2 and add align-self: flex-start:

/****************3 columns****************/.columns {  display: flex;  justify-content: space-between;}.column {  flex-basis: 30%;  display: flex;  flex-direction: column;  justify-content: flex-start; align-items: ...

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.