Visualize grid cell boundaries to clearly see how child elements position within each cell
Adjust four alignment properties to observe different levels of alignment effects
Vertical alignment within cells
Horizontal alignment within cells
Vertical alignment of entire grid
Horizontal alignment of entire grid
align-items: center
| justify-items: center
| align-content: center
| justify-content: center
3x3 grid with extra container space to demonstrate content alignment effects
start
- Align child elements to top of cellcenter
- Center child elements verticallyend
- Align child elements to bottom of cellstretch
- Stretch child elements to fill cell heightstart
- Align child elements to left of cellcenter
- Center child elements horizontallyend
- Align child elements to right of cellstretch
- Stretch child elements to fill cell widthstart
- Align grid to top of containercenter
- Center grid verticallyend
- Align grid to bottom of containerspace-*
- Distribute space between grid rowsstart
- Align grid to left of containercenter
- Center grid horizontallyend
- Align grid to right of containerspace-*
- Distribute space between grid columns