From the course: CSS: Combining Grid and Flexbox
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Combining Flexbox and Grid - CSS Tutorial
From the course: CSS: Combining Grid and Flexbox
Combining Flexbox and Grid
- [Instructor] Now you may be wondering what's next. After all, flexbox and CSS Grid layouts seem to accomplish similar things. Remember, it's not a flexbox versus Grid debate. It's more of learning how to use them together. The more I've played around with both Grid and flexbox, the more I found that it isn't necessary to choose one or the other. but which one should I use, flex or Grid? Grid is great if you can break your design into a grid. Flex is great if your design spans either horizontally or vertically. Grid allows for break points in responsive design. Grid and flexbox are both excellent tools. Pick the tool that best suits what you're trying to build. I've talked about how flexbox is primarily for one dimensional layouts, and Grid is used for two dimensional layouts, but sometimes you need both. CSS Grid and flexbox, their coexistence allows us to do magical things. They should be used in conjunction with each…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.