Removing space between custom liquid sections

Topic summary

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.

Summarized with AI on December 15. AI used: gpt-5.

HI Natasha,
I have a similar problem and I have tried everything to resolve this. Just need the space above my custom liquid video to be removed here. What is the best way to get rid of this on the top page?