Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn how to control the maximum number of columns in CSS Grid layouts using auto-fit or auto-fill in this 17-minute tutorial. Discover techniques to set upper limits on column creation through calc() functions, making your grid layouts more predictable and responsive. The video walks through a basic auto-fit setup, demonstrates the necessary mathematical calculations, improves code readability, implements responsive stacking for smaller screens, prevents overflow issues, and introduces an advanced technique using newer CSS features. Complete with code examples and practical demonstrations, this tutorial provides everything needed to master grid column management for more flexible and controlled layouts.
Syllabus
00:00 - Introduction
00:50 - Basic setup with auto-fit
03:00 - Having to do some math to make it work
05:28 - Making it more readable
06:30 - Making it stack at smaller sizes
09:10 - Preventing overflow
12:54 - An improvement we can make with a new CSS feature
Taught by
Kevin Powell