Design a school event poster

Use a wrapping Flexbox layout for cards that fit a phone or laptop.

What you’ll learn

Build a poster with Flexbox and test how activity cards wrap as the preview narrows.

Before you start

Open the poster example. Find index.html and style.css.

Steps

  1. Change the event title and time in index.html. Add a new <section> inside the activities box.
  2. In style.css, find display: flex; on .activities. Keep flex-wrap: wrap; and try increasing gap to 1.5rem.
  3. Press Run. Make the browser window narrow and check that each card still fits. Try changing flex: 1 1 12rem; to flex: 1 1 16rem;.

Expected result

Cards share a row when room is available and wrap to new rows on a narrow screen.

Common mistakes

Apply display: flex to the parent. The flex sizing rule belongs on each child card.