FAQ: Flexbox - Review: Flexbox


#1

This community-built FAQ covers the “Review: Flexbox” exercise from the lesson “Flexbox”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

FAQs on the exercise Review: Flexbox

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!


#2

I’m confused as to what is happening in step 1 of this exercise, and hoping someone can enlighten me please?

As per step 1, I added display:flex; at line 90. When I do this, the pictures swap from being arranged in rows to columns, but I don’t understand why. I had assumed I would need to make the .col div’s flex-boxes and set their flex-direction to column to achieve this.

I’m guessing I’m missing something fundamental about block vs inline.

Any clues would be greatly appreciated. :slight_smile: Thanks.

style.css.txt (1.4 KB)


#3

Hi there,

When you set the display: flex at Step 1, you create a flex container but this flex container holds the columns, and not the pictures. This Step 1 takes the .col’s and stacks them on the top-left of the .cards container.

Later you deal with the .col class where you play with the images.
In other words, here we speak about the last topic of the course - nested flex boxes.

I hope this answers the quesiton.