Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello,
I'm currently using a dawn theme
I had a sticky header overlapping with #MainContent on product page.
But at some point it started not to work...
I'm not sure what is triggering the sticky header to not work.
I'm trying to apply this same option on my homepage as well.
Can anyone please help?
This is the code I have in Theme.liquid before </body>
screenshot below for reference,
<style>
{%if template contains 'product'%}
.header-wrapper.gradient{
background:transparent !important;
}
.scrolled-past-header .header-wrapper.gradient{
background:#ffffff!important;
}
#MainContent{
margin-top:-60px!important;
}
{%endif%}
</style>
Please share your website to provide your with appropriate code
Thank you but I do not see the sticky header on the link provided. If this is an unpublished theme, please click preview and provide us the preview link
Please see below 2 images
Sticky header is enabled in the theme editor and I also have below code on my base.css
none of them work 😭