Relentless Feather Unit 2 ยท This Is Me In Tech Stage 3 of 7

Unit 2 ยท Stage 3

Flexbox and Cards

Your header looks great. Right now the three cards are stacked in a plain column. You will use flexbox to line them up in a neat row that wraps on small screens. (pause on a highlighted word to see what it does)

1 Meet flexbox

Your <main> has the class container, and it holds the three cards. When you make it a flex container, its cards line up side by side instead of stacking.

Native youth in tech: each card is a piece of your story. Flexbox lets them stand together, side by side, the way a community does.

2 The container rule

A few properties turn .container into a flexible row.

What this code means
display
flex turns the container into a flexible box and lines its cards up in a row.
justify-content
center pushes the row of cards into the middle of the page.
gap
The space between cards. 20px keeps them from touching.
flex-wrap
wrap lets cards drop to the next line on a narrow screen, so nothing gets squished.
โœ๏ธ Add the .container rule right under your h4 rule, inside your <style>. Use the example below if you need it, then press โ–ถ Run.

๐Ÿค” Quick check before you go on

What display value lines boxes up in a flexible row? Type it, then press Submit to unlock the next steps.

3 Style the cards

Each <section> has the class card. Give the cards a white background, rounded corners, a set width, and inside padding.

What this code means
background-color
white makes each card pop against the light blue page.
border-radius
Rounds the corners. 8px gives a soft, friendly edge.
width
How wide each card is. 320px keeps all three even.
text-align
left lines the text up on the left inside the card, which is easier to read than centered.
โœ๏ธ Add the .card rule right under your .container rule. Use the example below if you need it, then press โ–ถ Run.

โœ“ Finish this stage

To complete Stage 3, your .container needs display: flex and your .card needs rounded corners. Press Check my work when you are ready. This opens Stage 4 and lets your teacher see that you finished.

YOUR CODE
PREVIEW
Code Glossary
๐ŸŽฏ Your goal for this stage