A user seeks to remove excessive white space above and below payment icons on their Shopify product pages.
Initial Solution (Bottom Space):
Add CSS code to theme.liquid file above the </body> tag
Code targets .shopify-payment-button with margin-bottom: 0px !important;
Successfully removes bottom spacing
Follow-up Issue:
Top white space remains unresolved after initial fix
Additional Solution (Top Space):
Insert separate CSS targeting .shopify-payment-button__button with margin-top: -15px !important;
Also placed in theme.liquid above </body> tag
Spacing value (-15px) can be adjusted to achieve desired positioning
Status: Awaiting confirmation from original poster on whether the combined solutions resolved both spacing issues. Both helpers provided working code snippets with visual examples of expected results.
Summarized with AI on October 30.
AI used: claude-sonnet-4-5-20250929.
Here’s to adjust the top space → Please follow my steps below:
Step 1. Go to Online Store
Step 2. Find “Edit Code”
Step 3. Find “theme.liquid” file
Step 4: In the bottom of the file → find tag → add this code above tag: