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
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Yo! I’m in exactly the same place in my Odin Project curriculum. I’m also actually doing OpenClassrooms bootcamp (through my employer). I didn’t struggle too much with flex (except in column format. It’s so bad.) feel free to DM me and chat about it if you want a project partner! I’m on discord too. Same username.

    • w3dd1e
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months 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!

      • w3dd1e
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        That looks great! You did a fantastic job! I can tell you really tried to learn it and not just get through the chapter.