Jump to content

Custom CSS - Gradient Header for Media Screen - Sonny Template

Recommended Posts

Hello,

I'm working in the Sonny template. I'm trying to problem solve on why the gradient header works in desktop view and tablet view, yet not the phone view. Along with adding a gradient header/footer, I've also fixed the navigation bar and adjusted the banner. Please see the CSS below. The only thing that isn't working is the header on the phone view. Even the Footer is showing the gradient in all views. Is there something I'm doing wrong?

.Header {background: rgb(253,177,57);background: linear-gradient(333deg, rgba(253,177,57,1) 0%, rgba(253,147,47,1) 14%, rgba(242,96,39,1) 100%);}

header { position: fixed !important; width: 100%; z-index: 99999; }

@media only screen and (min-width:640px) { main { padding-top: 82px; } }

.Footer {background: rgb(253,177,57);background: linear-gradient(333deg, rgba(253,177,57,1) 0%, rgba(253,147,47,1) 14%, rgba(242,96,39,1) 100%);}

Edited by ssmugala
Initial Revision
Link to comment
  • 1 year later...

@tuanphan Hey mate! I've used the code here in this thread - and it works on the Services and About Page (link in nav) but on the home page/test page - where there is a gallery behind the nav and where I need it to work - it isnt working, ythe gradient turns into a solid?. Any idea why it works as gradient one page, and solid the other? Thank you in advance! 

https://moose-semicircle-6ext.squarespace.com/

password: hello123

 

Link to comment
On 10/7/2020 at 9:17 PM, heytom88 said:

@tuanphan Hey mate! I've used the code here in this thread - and it works on the Services and About Page (link in nav) but on the home page/test page - where there is a gallery behind the nav and where I need it to work - it isnt working, ythe gradient turns into a solid?. Any idea why it works as gradient one page, and solid the other? Thank you in advance! 

https://moose-semicircle-6ext.squarespace.com/

password: hello123

 

New code

header.Header {
    background: #f5f5f5;
    background: linear-gradient(180deg,#f5f5f5 0%,#f5f5f5 0%,rgba(245,245,245,0) 100%) !important;
}

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.