How can I remove this extra space in the product page ONLY ON DESKTOP! Website: moorekainley.com
Topic summary
A user seeks to remove extra white space appearing on product pages, but only on desktop view for their Shopify store (moorekainley.com).
Solutions Provided:
-
CSS injection method: Add custom CSS code in
theme.liquidfile above the</head>tag to target and reduce the spacing. Initially placing it above the head tag didn’t work, but positioning it below the head tag successfully resolved the issue. -
Alternative approach: Locate
main-product.liquidfile and directly adjust themargin-topproperty in the existing style code, specifically targeting.body.template-product.body-theme .page-containerwith a media query for desktop screens (min-width: 768px).
The issue was successfully resolved using the first method after correct code placement. Both solutions involve CSS modifications to control desktop-specific spacing on product pages.
Hi @omar_ab ,
Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above tag:
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you ![]()
Pasted above the head tag, it did not work for some reason.
I put it below the head tag and it worked, thank you!
@omar_ab , No problem. Have a good day ![]()


