Shopify themes, liquid, logos, and UX
HI everyone,
i've use this code to get the sticky header for the debut theme:
#SearchDrawer {
z-index:1001;
}
.site-header {
position: fixed;
z-index:1000;
left:0;
right:0;
-webkit-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
-moz-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
-ms-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
-o-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
}
#PageContainer {
padding-top: 200px;
}
@media screen and (max-width: 749px) {
#PageContainer {
padding-top: 70px;
}
}
Now i face the issue, that the sticky header is overlaping site elements.
You can see that on different pages, part of the elements and plugin elements disappear behind the header.
How can i fix that?
Thats the link to the website.
Thank you,
Solved! Go to the solution
This is an accepted solution.
@Roombles I guess some JS code is adding the space through padding. The quick fix is just to override that padding through CSS.
Just put the below code at the end of your css file and this should do the trick.
.page-container {
padding-top: 0 !important;
}
Hey @Roombles,
Replace the CSS you have added for .site-header with the below code and let me know if it works for you.
#shopify-section-header {
position: sticky;
top: 0;
z-index: 1001;
-webkit-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
-moz-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
-ms-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
-o-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
}
Thank you!!
@Amarjyoti Thank you for the message!
i did replace it but now i have a white space at the bottom of the header. (Screenshot attached)
Any idea what to do?
Thanks
This is an accepted solution.
@Roombles I guess some JS code is adding the space through padding. The quick fix is just to override that padding through CSS.
Just put the below code at the end of your css file and this should do the trick.
.page-container {
padding-top: 0 !important;
}
yes that worked for me! Thank you very much 🙂
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025