Pricing Blog

Div going 100% width

  • ssssadsadasd-1316718317615972373

    ssssadsadasd

    6 months ago

    Anyone has any idea why this group is going 100% width even though I have not set any of the other divs at 100%?
    also the divs containing the icon and text are not 100% width. thanks.
    https://vimeo.com/1038520302/fc9df76296?ts=0&share=copy
  • lucasg-1316766840860704831

    Lucas G

    6 months ago

    Default behavior. It’ll take up whatever space it has wherever you use it.
  • If you want it to only be as big as the content then set width to “fit-content
    1
  • Or set a max-width
  • tomthebigtree-1316768328274149406

    Tom Ireland

    6 months ago

    ☝️
  • tomthebigtree-1316768760836788225

    Tom Ireland

    6 months ago

    Just to add for fun times, if you want to control the width via the component attributes, you can use a style variable and use the empty value option to set arbitrary values that don't have a unit e.g. 100% and fit-content. I was doing that yesterday for a button, so thought it might be useful.