Jump to content

Change solid header background to transparent on scroll

Recommended Posts

On 10/5/2022 at 3:03 PM, Sophie_T said:

Site URL: https://alpaca-ellipse-7m5r.squarespace.com/

Hello. I have a white solid background for my header but I would like it to be fully transparent once you start scrolling? Any help appreciated.

Password: brian

You can try the following code

#header.shrink .header-border, #header.shrink .header-background-solid{
  background: transparent;
}

Support me by pressing đź‘Ť if this useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • 2 weeks later...
On 10/6/2022 at 3:55 PM, bangank36 said:

You can try the following code

#header.shrink .header-border, #header.shrink .header-background-solid{
  background: transparent;
}

Support me by pressing đź‘Ť if this useful for you

Hi. I pasted this into the HEADER section of the CoDE INJECTION part if ADVANCED SETTINGS. I refreshed my site but it didn't;t work and I have that code visible - see pic.

Screenshot 2022-10-15 at 12.33.42.png

Edited by Ratch
Link to comment
15 hours ago, Ratch said:

Hi. I pasted this into the HEADER section of the CoDE INJECTION part if ADVANCED SETTINGS. I refreshed my site but it didn't;t work and I have that code visible - see pic.

Screenshot 2022-10-15 at 12.33.42.png

Can you share your site?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • 2 weeks later...
On 10/24/2022 at 10:21 PM, Ratch said:

I cannot share site access it's a business site with lots of private stuff on there. I can share screengrabs of specific things?

You can duplicate the site, remove all elements, except header, then share its url

Or you can setup new trial template with same header layout + Share url.

We can help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
3 hours ago, tuanphan said:

You can duplicate the site, remove all elements, except header, then share its url

Or you can setup new trial template with same header layout + Share url.

We can help easier

This is what I have done - did I paste it incorrectly?

 

 

Screenshot 2022-10-27 at 17.24.43.png

Link to comment
  • 1 year later...

Helloo, 

I used this code for my website and it works : )

#header.shrink .header-border, #header.shrink .header-background-solid{
  background: transparent;
}

Only I want the background to be 50% transparent and change the solid color underneath on scroll. 
Is there a way to do so? 

Link to comment
On 3/6/2024 at 12:57 PM, wietske said:

Helloo, 

I used this code for my website and it works : )

#header.shrink .header-border, #header.shrink .header-background-solid{
  background: transparent;
}

Only I want the background to be 50% transparent and change the solid color underneath on scroll. 
Is there a way to do so? 

Use this code to for 50% transparent

#header.shrink .header-border, #header.shrink .header-background-solid{
  background: rgba(255,255,255,0.5) !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Ă—
Ă—
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.