Layout Block

I have two blocks horizontal to each other. The first is a flex wrap and the second is a normal block. I want the flex wrap to only take up as much space as it needs for the elements it contains. I can’t fix this by setting a width, because the width it needs will vary depending on the wrapping.

Chrome developer tools shows a purple area with dashed lines suggesting there is extra space in the flex wrap not being used by the child elements, pushing out the other block to the far-right of the screen. For some reason, I can’t seem to figure out how to tell the flex-wrap to only take up the space its child elements need.

Unrelated question: is it possible to setup parallel action flows in the codeless UI builder, so that two sets of actions run simultaneously, rather than one after the other? I’m trying to reduce load time on pages that have a a few queries and API calls that don’t really need to wait on each other.

Hello David King,

Could you please provide your appId and specify on which page this layout is located?
As for the second question, you can use the Run Code Async Block.

Regards,
Alexander

App ID: 33ECD666-2D72-4A69-B84B-AF9042E95A63
App: Compass
Container: Main2
Page: Billing

The right block only appears when loaded on a wide browser-screen (this is intentional). Then, the gap appears depending on how the browser window is resized as the wrapping on the left changes things.

Thank you! The behavior you’re experiencing is indeed expected when using flex-wrap within a flex container. Flex containers by default attempt to use as much space as is available, even when their children wrap to new lines.

This happens because a flex container’s default behavior is to stretch its items to fill the space. When items wrap, the container doesn’t automatically resize to fit just the content—it still spans the maximum width allowed by its parent element.

Regards,
Alexander

Got it. How do I fix it though, so the left block only takes up as much space as the items it contains? I’ve been able to do this successfully on other pages (see attached), but I can’t figure out why it works the way I intended on some pages and not others.