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.

  • w3dd1e@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    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!