this post was submitted on 21 Aug 2023
11 points (92.3% liked)

Web Development

0 readers
1 users here now

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

I'm struggling with CSS Flexbox. Each time I think I'm about to get it in an aha momet, I'm actually two steps backwards. I'm taking The Odin Project course and I'm at the phase where I am building the landing page. I've worked on it for 16 straight hours and I'm almost finished. It just looks like shit on a small screen but in fairness, the curriculum did mention that. Otherwise, what I have looks like the goal. I did one or two extra easy touches.

Okay so one question: when is it better to use flex-direction: column and when is it better to use flex-direction row? I'm seriously confused.

you are viewing a single comment's thread
view the rest of the comments
[–] w3dd1e@lemm.ee 1 points 1 year ago

I was talking to my teacher about how annoying flex box columns are and he was saying it wasn’t designed with columns in mind and he expects it to be updated in some future version of CSS. But until then, it depends how you want the box to grow/shrink.

I also found, you can trick it into a column while still using a row if you give the items a 100% width of their container and let them wrap to the next row. It might not always be right to do that, but it could probably work in some situations if it’s not going well in column format.

Good luck!