How can I make a transparent header that isn't sticky?

Solved

How can I make a transparent header that isn't sticky?

INFRA
Shopify Partner
133 0 53

Hi there,

 

I made a transparent header, but I don't want it to be sticky. How do I disable this? When I do this in the editor, the transparency doesn't work anymore.

I used the below code for the transparent header which I guess makes it a sticky header. Can I just use code for only the transparent bit?

 

 

sticky-header.header-wrapper.color-background-1.gradient {
     position: absolute;
     left: 0;
     width: 100%;
     background: transparent;
}

 

 

website

password: meifay

 

Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
9527 1913 1947

This is an accepted solution.

Hi @INFRA 

Please disable sticky option in your theme editor, remove code you added and then add this code to your theme.liquid file 

<style>
.shopify-section-group-header-group .header-wrapper { 
    background: transparent !important; 
}
{% if template == 'index' %}
#MainContent { margin-top: -135px !important; }
{% endif %}
</style>

 

- Helpful? Like and Accept solution! or Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- 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 7 (7)

laddisahsi
Shopify Partner
385 38 41

Hi @INFRA 

First please remove sticky header 
Then use this css

.header-wrapper.color-background-1.gradient {
     position: absolute;
     left: 0;
     width: 100%;
     background: transparent;
}


Remove sticky class from the code.

If this solution is worked, then please Like this and Mark this as accepted solution!


Laddi


 

-Shopify website development, Theme & App Development
-Contact me: WhatsApp


-Email Me
-If this solution is worked, then please Like this and Mark this as accepted solution!

Dan-From-Ryviu
Shopify Partner
9527 1913 1947

This is an accepted solution.

Hi @INFRA 

Please disable sticky option in your theme editor, remove code you added and then add this code to your theme.liquid file 

<style>
.shopify-section-group-header-group .header-wrapper { 
    background: transparent !important; 
}
{% if template == 'index' %}
#MainContent { margin-top: -135px !important; }
{% endif %}
</style>

 

- Helpful? Like and Accept solution! or Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

INFRA
Shopify Partner
133 0 53

hi @Dan-From-Ryviu  this worked, thank you!  It's just on mobile the h2 text is too high up.

 

I tried to use below code but it's not working, is there anything else I can try?

@media (min-width: 768px) {
  h2 {
    font-size: 30px;
    padding-top: 100px;
  }
}

 

Dan-From-Ryviu
Shopify Partner
9527 1913 1947

You already fixed. Awesome

- Helpful? Like and Accept solution! or Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Anshul_arora
Navigator
453 128 96

Hello @INFRA ,

I have looked through your store https://top-squad-soccer-academy.myshopify.com and can assist you in resolving your issue.

Please follow the below mentioned steps for making the header non-sticky -:

Steps-:

1. Go to Online Store -> Themes-> Click Customise https://prnt.sc/qeo24Oc3D8z_

2. Now, click on Header https://prnt.sc/0Qv_R2ABuM-h  , then Header section option setting will appear, scroll down at the end and click custom css https://prnt.sc/Rp536rpbvvgM

3. Next, add the below mentioned code in the this section https://prnt.sc/Z5c55s52eYkK

.header-wrapper.color-background-1.gradient {
position: relative;
left: 0;
width: 100%;
background: transparent;
}

4. Save

Output = Header appear in store https://prnt.sc/wTcXJx5JvR5s , while we scroll down, it will not appear https://prnt.sc/X3L2AcHCKwZ6 

 

I hope it helps.

Please let me know if you need any assistance.

Thank you.

Please remember to like and accept the solution to help other store owners.

For Shopify Design & Development | Custom Coding -Visit Here
INFRA
Shopify Partner
133 0 53

hi @Anshul_arora  this does not work, unfortunately. Is there another code that can be used?

 

Screenshot 2023-11-22 at 09.31.08.png

MRamzan
Shopify Partner
275 3 34

Here is the way to make it transparent but not sticky:

 

Hire Me:

WhatsApp: +91-9145985880
Email: mohdramzaan112@gmail.com
Skype: mohdramzaan112