Hello everyone,
my name is Julian and i need help with my code…
The problem:
I coded a sticky header and it works perfect on the main page, but on the other pages it blocks the titles itself so that only the lower parts of the letters remains. as you can see in the attached photos.
this is the code:
.header.header--center {
position: fixed !important;
top: 0 !important;
width: 100% !important;
z-index: 1000 !important;
transition: background-color 0.3s, color 0.3s; /* Übergangseffekt */
}
.header.header--center.scrolled {
background-color: white !important; /* Weißer Hintergrund bei Scroll */
color: black !important; /* Schwarzer Text bei Scroll */
}
.header.header--center a {
transition: color 0.3s; /* Übergangseffekt für Links */
}
.header.header--center.scrolled a {
color: black !important; /* Schwarzer Linktext bei Scroll */
}
i tried it with padding top but that doesnt work…
does someone know how to fix this? i cant find help on this online…
Greets!
Julian
1 Like
Hello @Mein-Grinder ,
Follow these steps:
-
Go to Online Store → Theme → Edit code
-
Open your theme.css file and paste the following code at the bottom:
main#main {
padding-top: 40px;
}
.template-index main#main {
padding-top: 0 !important;
}
Thanks
This is Richard from PageFly - Shopify Page Builder App
Hi @Mein-Grinder Please add code here to fix it:
Step 1: Online Stores > Themes > Edit code
Step 2: Choose file theme.liquid
Step 3: Add code above the tag
Hope my solution will help you resolve the issue.
Best regards,
Richard | PageFly
where do i have to put it in?
unfortunately that didnt work…
would be very happyfor help 
Hi @Mein-Grinder
You can change your code to this to solve the issue
{% if template != 'index' %}
{% endif %}
gonna try it as soon as im home! 
where do i have to put it in? 
Replace the code you added with my code.
man i dont get it… its not working either…
what is the issue what did you think cant we just enlarge the space between the title and the upper part of the site?
i have sent you the link so im think you are going to test it on the site…
if your solutions works imma pay you 
im really dumbfounded by the fact that i cant find tutorials or other help so i need to ask you…
pls heeeeelp xD
If you want, you can share your store credentials and I’ll do it for you.
Contact info in forum signature.
Where did you add the code?
right beneath the body tag, where i put the other code also 
what do you mean by store credentials? the domain? mein-grinder.com
or do you want to give you access, or do you want me to generate you a code to log-in into my admin?
Yes need access, please generate the code so I can send a request.
I need only 5 minute to implement the solution.
Please try update code to this and check again
{% if template == 'index' %}
{% else %}
{% endif %}