Does anyone know how to display items side by side (image on top, text below) when there are multiple items, instead of having them stacked vertically? Currently, they only appear one on top of another. I’ve attached an image for reference

Does anyone know how to display items side by side (image on top, text below) when there are multiple items, instead of having them stacked vertically? Currently, they only appear one on top of another. I’ve attached an image for reference

Best answer by StefanUE
Hey, thanks for the tap in!
<div style="display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;">
{% for item in event.extra.line_items %}
<div style="display: inline-block; width: 200px; vertical-align: top; text-align: left; border: 1px solid #ddd; padding: 10px;">
<img src="{% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{% else %}{{item.product.images.0.src|missing_product_image}}{% endif %}" width="180" style="display: block; margin: 0 auto 10px;" />
<strong>{{ item.product.title }}</strong><br/>
Quantity: {{ item.quantity|floatformat:0 }}<br/>
Total: {% currency_format item.line_price|floatformat:2 %}
</div>
{% endfor %}
</div>
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.