Using CSS for Layout

CSS styling allows us to set colors and fonts. It's also used to lay out a page. Web page layout is about placing elements in relative locations. Look at these images to see schematics of different page layouts.

These different layouts help us understand what "layout" means. It's all about the positioning of elements on a web page.

We'll work on the centered and image gallery layouts in projects this week.

Before we add CSS for these layouts, we'll look at two broad techniques for controlling how elements are positioned on a page relative to each other: the Box Model and the Flexbox Model.

Common Layout

Layout With No Styling

Centered Layout

Last updated