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 🙂
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024