CSS - Flexbox

Jun 12, 2026 3:00pm UTC (Check your timezone)

Theory Workshop Lab Review Quiz Certification project

Instructors: Jess, Carmen, and Eda

Flexbox

Download iCal File

Before this session, please:

During this session, we’ll:

After this session, please:

Instructor notes

Working with CSS Flexbox: What Is CSS Flexbox, and When Should You Use It?

Flexbox is a one-dimensional layout method that lets us arrange items in rows or columns. Because items expand to fill additional space or shrink to fit into smaller spaces, it’s helpful for us to create responsive websites that can adapt to different screen sizes and orientations.

The two concepts related to flexbox are:

Within a flex container, we can arrange elements. To make an element a flex container, we can define its display property with the value flex:

1.container {
2  display: flex;
3}

A flex item is a direct child of a flex container. For items aligned on the horizontal axis, setting their width will not make them “flex"ible. (Likewise, for items in the vertical axis, defining the height will not make them flexible.)

A flex container is a block-level element. It has two axes:

Flex items are arranged in the direction of the main axis. The main axis is by default horizontal, and the cross axis is vertical. The cross axis is perpendicular to the main axis.

With the flex-direction, we can change the direction of the main axis. The default value is row, but we can set it to row-reverse, column, or column-reverse.

Working with CSS Flexbox: What Are Some Common Flex Properties, and How Do They Work?

There are some commonly used flex properties:

1main {
2  display: flex;
3  flex-flow: column wrap-reverse;
4}

With this exercise, we’re going to practice designing with flexbox!

Design a Set of Colorful Boxes

We’ll take a look at this workshop that goes over flexbox and color theory concepts that we’ve learned.

Design a Pricing Plans Layout Page

We’ll briefly answer your questions (if any!) related to this exercise, which goes over the topics we’ve learned so far.

CSS Flexbox Review

In this unit, we’ve mainly explored:

Build a Page of Playing Cards

The first certification project of the CSS section is a fun exercise to practice all we’ve learned so far!