The home where you level up — daily 3-minute lessons.
Save my spot.nav {
display: flex;
}
.nav a {
margin: 0 auto;
}.nav {
display: flex;
justify-content: center;
gap: 16px;
}justify-content and gap handle main-axis spacing on the container, with no per-item margins.
justify-content: center does nothing because items have flex: 1 and fill the row.space-between and the last row of wrapped items spreads out unevenly.gap with justify-content, not margins on each item.flex-direction: column container, justify-content is used for vertical alignment.justify-content aligns along the main axis. align-items aligns along the cross axis.
space-between puts no space at the edges, space-around puts half gaps at the edges, and space-evenly makes all gaps equal.
There is no free space: items fill the container because of flex-grow, or the parent is not a flex or grid container.

Daily 3-minute lessons to understand your AI's code.