

The margin will now take up the space on top of the selected element, pushing itself downwards. Or for 1 individual flex-item, use 'margin' with 'auto': Then you need to use justify-content to do vertical alignment for all flex-items: This is the default layout when you use flex-direction: column: Note that when you use flex-direction: column, the 'align'-properties will now work for the horizontal axis instead of the vertical axis. Or use align-self: end to make it sit at the bottom: This was for aligning ALL flex-items vertically, but what if we just want to vertically align an individual flex-item? We can use align-self for that: This is because Flexbox and CSS Grid are being harmonized so that we can use the same properties in both systems, so the 'flex-' and 'grid-' prefixes are being dropped. However, 'flex-end' is being phased out and the future is 'end'. Note that we used the value 'end' here, but 'flex-end' still has better browser support. Or maybe we want them all to sit at the bottom: For example, if we want them to sit in the center: We can use align-items to determine where along the vertical axis all flex-items should sit.

To understand vertical aligning in Flexbox, let's start from the default layout in Flexbox: If you haven't mastered both of them yet, I highly recommend going through my CSS Course.

You need to master both Flexbox and CSS Grid in order to professionally build modern websites & web apps.
