We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Seperator line on header only showing while scrolling

Solved

Seperator line on header only showing while scrolling

silenceclothing
Explorer
132 0 17

Skjermbilde 2025-01-09 kl. 00.25.02.png

Skjermbilde 2025-01-09 kl. 00.24.53.png

Hello. I only want to show the separator line under the header when scrolling. Does anyone know how to do this?

Accepted Solution (1)
Dan-From-Ryviu
Shopify Partner
12073 2359 2539

This is an accepted solution.

So please add code to theme.liquid file, after <head> and check again 

<style>
html .header-wrapper--border-bottom { border-bottom: unset !important; }
html .scrolled-past-header .header-wrapper--border-bottom { 
    border-bottom: .1rem solid #dddd !important;
}
</style>

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

View solution in original post

Replies 9 (9)

DaisyVo
Shopify Partner
4469 501 600

Hi @silenceclothing 

 

To complete your requests, please follow these steps:
  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.

 

sticky-header.header-wrapper {
    border-bottom: 2px solid white !important;
}

 

Here is the result: image_720.png

 

I hope this helps

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

Hi @silenceclothing 

You can add this code to Custom CSS in Online Store > Themes > Customize > Theme settings to do that

html .header-wrapper--border-bottom { border-bottom: unset; }
html .scrolled-past-header .header-wrapper--border-bottom { 
    border-bottom: .1rem solid rgba(var(--color-foreground), .08);
}

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

silenceclothing
Explorer
132 0 17

Where do i put this code ?

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

Go to your store admin > Sales Channels > Online Store > Themes > Customize > Theme settings > Custom CSS

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

silenceclothing
Explorer
132 0 17

it did not work.

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

This is an accepted solution.

So please add code to theme.liquid file, after <head> and check again 

<style>
html .header-wrapper--border-bottom { border-bottom: unset !important; }
html .scrolled-past-header .header-wrapper--border-bottom { 
    border-bottom: .1rem solid #dddd !important;
}
</style>

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

GTLOfficial
Shopify Partner
881 182 192

Hello @silenceclothing 

Go to online store ----> themes ----> actions ----> edit code ---->base.css
add this code at the end of the file and save.

.header-wrapper.color-scheme-95fafa66-77d0-4a87-811c-eeb7bed11590.gradient.header-wrapper--border-bottom {
border-bottom: 1px solid white;
}

result
127.png

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

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh
silenceclothing
Explorer
132 0 17

i only want it to show when scrolling

silenceclothing
Explorer
132 0 17

thanks. It works now!