Please, I would like to know how to reduce the sticky header on the product page only for my store. I activated the sticky header for the store, but I don’t want it on the product page only. It should scroll with the page.
Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.
Please copy and paste the below code to the top of base.css or theme.css. To find base.css or theme.css, go to Online store >> Themes >> Edit code and search for either base.css or theme.css
Alternatively, if the code didn’t work, copy and paste the code below by going to the Online store >> Themes >> Customize >> Click on Settings icon to the left >> Scroll down to the bottom and paste it to the custom CSS tab. @media only screen and (max-width: 750px) {
Do not edit your theme code – “Custom liquid” section added to the Product page template will be more than enough and would not prevent your theme updates.
if my post is helpful, please like it ♡ and mark as a solution -- this will help others find it
You can definitely make the sticky header only scroll normally on product pages while keeping it sticky elsewhere. Since you’re using the Vessel theme, the easiest way is with a small CSS tweak.
1. Identify the product page body class
Most Shopify themes add a unique class to the <body> tag for each page type. For product pages, it’s usually something like template-product.
2. Override the sticky header on product pages
Add this CSS to your theme (Online Store → Themes → Customize → Theme Settings → Custom CSS or in your theme.scss.liquid file):