Fixed px margin on a "stretch" element inside a stack (classic card UI) . What's the intended approach?

Hi everyone,

I’m building a standard card for a Dynamic List (repeater): full-width image at the top, and below it a vertical Stack with some stacked text elements. Hierarchy: Dynamic List > Item > Stack > image + horizontal stack + title. See an example below.

I’d like the image to stay full width of the card, but the text elements below to have a fixed 10px margin on the left and right (so slightly narrower than the image, centered).

What I’ve tried:

  1. Set left margin 10px and right margin 10px on the text element, with “Element auto-dock” enabled. The value stays visible in the panel, but in preview/live the text goes back to full width, no margin applied.
  2. Tried disabling auto-dock and manually docking both left and right, but it’s not possible: clicking one side automatically disables the other.

I’m guessing this is a fairly standard situation (full-bleed image + inset content is a very common card pattern), so I was wondering: what’s the “canonical” way Wix Studio intends for this to be handled?
as it is a pretty standard case, i would prefer to avoid complex workarounds.

Thanks in advance!

Margin on a Stretch-sized element gets overridden by the stretch fill itself, that’s why your 10px stays in the panel but doesn’t render. The canonical pattern for “full-bleed image + inset content” in Studio is padding on a wrapper Stack, not margin on the element.

So: keep your outer vertical Stack (Item > Stack) with no padding, let the image stretch full width inside it. Then wrap the text elements in their own inner Stack, and on that inner Stack set Layout > Padding to 10px left/right. The text inside stretches to fill the inner Stack, and the inner Stack’s padding gives you the inset, while the image sibling above it stays untouched at full width.

That avoids the auto-dock fight entirely since you’re not trying to margin a stretched element at all, and it’s the same structure Wix’s own card templates use for this look.