Hello,
I just recently edited the theme.liquid code to make my header transparent. It worked well but on the mobile version there is a white line above the header… (see the screenshot)
Can anyone help me fix that?
A user implemented a transparent header by editing their theme.liquid file, which worked on desktop but created an unwanted white line above the header on mobile devices.
Problem Details:
Solutions Offered:
Multiple community members provided CSS fixes targeting different elements:
.header class#MainContent.banner__media elementAll solutions used @media screen and (max-width: 749px) to target mobile devices specifically.
Resolution:
The issue was successfully resolved. The user confirmed one of the provided solutions worked, though they didn’t specify which approach they implemented.
Hello,
I just recently edited the theme.liquid code to make my header transparent. It worked well but on the mobile version there is a white line above the header… (see the screenshot)
Can anyone help me fix that?
Hi @emilier , please share your website link so I can help fix it.
Thank you for the quick reply! My link is sublime-studios.co the password is IMRICH2002
Hello @emilier
Go to online store ----> themes ----> actions ----> edit code ----> base.css
add this code at the end of the file and save.
@media screen and (max-width: 749px) {
.header {
padding: 8px 3rem 8px 3rem;
margin-top: -23px !important;
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
Hi @emilier ,
Please change code:
@media (max-width: 749px) {
html #MainContent {
margin-top: -73px;
}
}
=>
@media (max-width: 749px) {
html #MainContent {
margin-top: -97px;
}
}
Hi @emilier , the code you added in your theme.liquid file, please update that to the following and that will fix the issue.
Hello @emilier ,
Here are the steps to apply the necessary changes in your Shopify store:
@media screen and (max-width: 749px){
.banner__media.media.scroll-trigger.animate--fade-in {
top: -23px !important;
}
}
Let me know if you need further assistance!
That worked, thank you!