From the course: CSS for Developers
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Deciding which layout module to use - CSS Tutorial
From the course: CSS for Developers
Deciding which layout module to use
- [Instructor] Before we look at when to use each layout module, let's recap what they do. First, there's flow, this is the default layout for the web, and it stacks elements vertically. Flexbox is a-one dimensional layout for flexible containers. And grid is a two-dimensional layout, offering very precise placement within defined rows and columns. So how do you decide which approach is ideal based on the layout that you're looking to accomplish? First, I'll start by saying that you can use any of these to create responsive layouts. With that in mind, let's start with when you might use a flow layout. Flow is great for simple, linear content structure, text-heavy layouts such as articles or blog posts, and basic alignment and positioning. A single-column blog post with headings, paragraphs, and images is really a perfect candidate. Flexbox is ideal for when you need flexible containers, meaning the items within container can shrink or expand dynamically, making this option responsive…
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.