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
- Change the event title and time in
index.html. Add a new<section>inside theactivitiesbox. - In
style.css, finddisplay: flex;on.activities. Keepflex-wrap: wrap;and try increasinggapto1.5rem. - Press Run. Make the browser window narrow and check that each card still fits. Try changing
flex: 1 1 12rem;toflex: 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.