Pricing Blog

Flex Display Issue

  • digitalsprint_05069-1418724497153986711

    Digital Sprint

    24 days ago

    newbie here, I'm creating a div with an image and text. when I set the parent div as flex: row. I get this issue where the text runs on. But the div block that I have for this text works fine on its own. What is causing this issue?
    1418724497527275541-image.png
  • Tod-1418724499821432966

    Tod

    24 days ago

    Great job @Digital Sprint! Your contribution to the Nordcraft Community just made you advance to Community Level 1! 🌲
  • whitep4nth3r-1418842996241203300

    salma

    24 days ago

    When asking for help it’s always useful to provide a link to your project or a minimal reproduction, otherwise it’s tricky to know what might be affecting things.
    👍1
  • lucasg-1418959631056769024

    Lucas G

    24 days ago

    Try adding a max-width of 100% to the text
  • digitalsprint_05069-1419158385042915479

    Digital Sprint

    23 days ago

    Here's the link to a new project with the issue: https://cyan_dorm__yammering_hippopotamus.toddle.site/
    @Lucas G I tried the max-width, but that didnt work. It almost looks like when I do 100%, it wants to disregard the image and do 100% of what the parent div would be.
  • lucasg-1419169469988868208

    Lucas G

    23 days ago

    Add a flex: 1 to the div wrapping the h1
  • 1419169475487465525-image.png
    ❤️1
  • This happens because the reset sheet has flex-shrink: 0 by default
  • digitalsprint_05069-1419300426129608794

    Digital Sprint

    23 days ago

    Awesome, thank you so much!