Transparent header looks weird on mobile

Solved

Transparent header looks weird on mobile

emilier
Tourist
10 0 0

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?

Screenshot 2025-04-08 at 9.40.16 AM.png

Accepted Solution (1)

EBOOST
Shopify Partner
1394 351 428

This is an accepted solution.

Hi @emilier ,

I checked your store. You can refer screenshot below to adjust code.

EBOOST_0-1744099532350.png

EBOOST_1-1744099616452.png

 

- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: eboost10@gmail.com
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free. Github.com/eboost10
- ❤❤DONATE ❤❤Coffee tips

View solution in original post

Replies 8 (8)

Junaid-Ahmed
Shopify Partner
123 23 25

Hi @emilier, please share your website link so I can help fix it.

emilier
Tourist
10 0 0

Thank you for the quick reply! My link is sublime-studios.co the password is IMRICH2002

Junaid-Ahmed
Shopify Partner
123 23 25

Hi @emilier, the code you added in your theme.liquid file, please update that to the following and that will fix the issue.

 

<style>
.section-header .header-wrapper {
  background: transparent;
  transition: background .25s ease-in-out;
}

#MainContent {
  margin-top: -81px;
}

html .section-header.scrolled-past-header .header-wrapper {
  background: #fff;
}

@media (max-width: 749px) {
  html #MainContent {
    margin-top: -96px;
  }
}
</style>

 

Rahul_dhiman
Shopify Partner
803 154 169

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
100.png

If this was helpful, hit the like button and accept the solution.
Thanks

Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront

Contact here


BEST CUSTOMER ACCOUNTS APP WITH CUSTOM WISHLIST OPTION 
TRY OUR APP :

PWC: Customer Accounts & Pages

EBOOST
Shopify Partner
1394 351 428

This is an accepted solution.

Hi @emilier ,

I checked your store. You can refer screenshot below to adjust code.

EBOOST_0-1744099532350.png

EBOOST_1-1744099616452.png

 

- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: eboost10@gmail.com
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free. Github.com/eboost10
- ❤❤DONATE ❤❤Coffee tips
emilier
Tourist
10 0 0

That worked, thank you!

namphan
Shopify Partner
2571 334 379

Hi @emilier,

Please change code:

@media (max-width: 749px) {
    html #MainContent {
        margin-top: -73px;
    }
}

=>

@media (max-width: 749px) {
    html #MainContent {
        margin-top: -97px;
    }
}

 

Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com

ZestardTech
Shopify Partner
6118 1095 1471

Hello @emilier ,

Here are the steps to apply the necessary changes in your Shopify store:

  1. In your Shopify Admin, navigate to Online Store > Themes > Actions > Edit Code.
  2. Locate Asset > base.css and paste the following code at the bottom of the file:
@media screen and (max-width: 749px){
.banner__media.media.scroll-trigger.animate--fade-in {
    top: -23px !important;
}
}

ZestardTech_0-1744105144198.png


Let me know if you need further assistance!

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing