Hi,
You can surround the custom code with <div style="margin-top: -10px;> fix it until the images touch the edges this will solve the issue the space is the main container for the custom liquid block.
Issue: Small white space appeared between three Custom Liquid blocks (Shopify templating sections) on a product page, not attributable to margin or padding; the container seemed taller than the content.
Early attempts: Suggestions included deleting custom code or adding a snippet to theme.liquid, and wrapping content with a div using negative margin-top. The negative margin only clipped images and did not remove the white borders.
Root cause and fix: The extra space was caused by the line-height applied via a text-center class affecting the Custom Liquid container. Overriding/removing that line-height for the affected section resolved the spacing. The original poster confirmed the fix worked.
Artifacts: Screenshots were central to diagnosing the spacing and identifying the text-center class/line-height as the culprit. A CSS adjustment (not fully shown in the thread) was the effective remedy.
Status: Resolved for the original case. Additional participants reported similar spacing issues (e.g., space above a Custom Liquid video) and requested step-by-step instructions for adding the CSS fix, which remain unanswered in the thread.
Hi,
You can surround the custom code with <div style="margin-top: -10px;> fix it until the images touch the edges this will solve the issue the space is the main container for the custom liquid block.