Removing space on product page under price

Topic summary

A user working with the Woodstock theme seeks to reduce vertical spacing between the product price and an Afterpay message on their product pages to create a more cohesive layout.

Initial Solutions Offered:

  • PageFly-Richard suggested adding CSS code to theme.liquid above the </head> tag
  • This solution removed space above the price but didn’t address the gap above the Afterpay message

Refined Solution:

  • Tech_Coding provided alternative CSS targeting the specific element: div.shopify-block:has(square-placement) with margin-top: -26px !important;
  • Code should be placed before </body> in theme.liquid
  • This approach specifically targets the spacing issue between price and Afterpay messaging

Status: The discussion appears to have an accepted solution, though final confirmation from the original poster isn’t shown. Both solutions require editing theme.liquid file through the Shopify code editor.

Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

Hi, thanks for your help! I am using Woodstock theme, my store is: https://leadingsolutions.co.nz/.

I am trying to reduce the space between the price and the afterpay message on the product page so that they are a bit more cohesive but I can’t figure out how to do it. See below.

Hi @Franrulzok

This is Richard from PageFly - Shopify Page Builder App

Please add this code to your theme.liquid above the to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the


Hope this can help you solve the issue

Best regards,

Richard | PageFly

Thanks for your reply. This just removes the space above the price (which I’m not as keen on) but the spacing above afterpay message is still there?

Hello @Franrulzok

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

div.shopify-block:has(square-placement) { margin-top: -26px !important; }

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.