A flex container has two directions to think about. Items run along the main axis; the cross axis runs across it, at a right angle. Picture items in a row: their main axis is horizontal, so their cross axis is vertical. section 12.2
Find the cross axis in two steps:
- Check flex-direction. With row, the main axis is horizontal; with column, it is vertical. section 12.2
- Turn your attention 90 degrees. That perpendicular direction is the cross axis. section 12.2
Center items across a row
Try `.container { display: flex; flex-direction: row; align-items: center; }`. The items run along a horizontal main axis, while `align-items` centers them along the vertical cross axis. Change `row` to `column` and ask yourself: which direction is across now? section 12.2
container {
display: flex;
align-items: stretch|flex-start|flex-end|center|baseline;
}
Browse the available `align-items` values when choosing how flex items sit along the cross axis. section 12.2


