Overview
Learn how to center the bottom row when using CSS Grid's auto-fit feature in this 27-minute tutorial video. Explore the limitations of flexbox for this specific layout challenge, and discover an innovative solution inspired by Ryan Mulligan's approach. Master advanced CSS Grid techniques including setting up centered leftover elements, implementing two-column spans, and managing last-child centering for both two and three-column layouts. While the solution may seem complex initially, gain a deep understanding of the underlying concepts that make this layout pattern achievable and practical for real-world applications.
Syllabus
- Introduction
- Maybe flexbox is what you want but there are limitations
- Being inspired by Ryan Mulligan
- Setting things up to center leftover elements with grid-auto-fit
- You need everything to span 2 columns
- Centering the last-child when we have “two” columns
- Centering the low row when we have “three” columns
Taught by
Kevin Powell