Div going 100% width

  • ssssadsadasd

    1 month 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
  • Lucas G

    1 month 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
  • Tom Ireland

    1 month ago

    ☝️
  • Tom Ireland

    1 month 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.

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.