Grid & Flexbox v3

Chapter 10: You try it: Putting it all together

How much have you learned? Let’s try it all out with an exercise all on your own.

Beginning CodePen

Lay out the page using Grid, based on all of the things you've learned so far:

Media queries will happen at 500px, 750px, 875px, 1000px. Use a mobile-first approach. Basic formatting will not need to be changed.

Recommended approach:

  1. Review the HTML. Review the designs below.
  2. Start with the mobile layout. Consider how you might lay out this page since you have some cards with images and some titles without. There's no layout for the page itself, but there is a layout for the cards.
  3. Once the mobile design is stable, write a media query for 500px and up. Here you'll need Grid to lay out cards on the page and Grid to complete layouts within the cards.
  4. Repeat the process at 750px. You may find around 875px that you'll want to make a few minor tweaks, but no major changes to the layout.
  5. Finally write a media query for over 1000px.
  6. HINT: You may want to consider the titles as a separate layout unit from the cards with images.
  7. Less than 500px

    Stacked cards for mobile layout.

    500-749px

    Featured card spans 2 columns, other cards form 2 columns underneath.

    750-999px

    You may find that you want another media query around 875px for a few small modifications to the layout.

    Featured card spans 3 columns, other cards form 3 columns underneath.

    1000px and up

    Desktop layout has the featured card spanning 3 columns and 2 rows. A 4th column has 2 cards stacked on top of each other and next to the featured image. Remaining 4 cards are lined up underneath as 4 columns.

    Ending CodePen