WDD 130: Web Fundamentals

CSS Layouts: Flexbox

Overview

The flex CSS display property makes creating and controlling responsive layouts easy especially in a single horizontal or vertical container.

Flexbox is a one-dimensional layout method for laying out items in rows or columns. Items flex to fill additional space and shrink to fit into smaller spaces. Flexbox layout is most appropriate to the components of an application, and small-scale layouts, while the Grid layout is intended for larger scale layouts.

"For a long time, the only reliable cross-browser compatible tools available for creating CSS layouts were features like floats and positioning. These work, but in some ways they're also limiting and frustrating. The following simple layout designs are either difficult or impossible to achieve with such tools in any kind of convenient, flexible way:

- MDN

Prepare

Activity Instructions

  1. Complete the following online tutorial on CSS Flexbox (24 Levels): Flexbox Froggy
Screenshot of flexboxfroggy.com Level 22 of 24
Screenshot of Flexbox Froggy Level 22