Jump to content

Gradient between sections

Go to solution Solved by creedon,

Recommended Posts

Site URL: http://alcyball.squarespace.com

Hi!

I'm wanting to create a smooth transition between the first and second sections of my website using a gradient fade. The idea would be that the hero image has a color overlay, then that color transitions from 0 opacity at the top of the image to 100 opacity at the bottom of the image, and the color overlay is the same color as the next section on the website so that the transition looks seamless.

Any help would be so much appreciated!

Link to comment

Your site is private please set up a site-wide password.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
12 hours ago, BrandonH said:

Site URL: http://alcyball.squarespace.com

Hi!

I'm wanting to create a smooth transition between the first and second sections of my website using a gradient fade. The idea would be that the hero image has a color overlay, then that color transitions from 0 opacity at the top of the image to 100 opacity at the bottom of the image, and the color overlay is the same color as the next section on the website so that the transition looks seamless.

Any help would be so much appreciated!

Your website is in private mode. Please set a password and share it.

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment
  • Solution

Add the following to Design > Custom CSS.

.homepage #page .page-section:first-child .section-background-overlay {

  background : linear-gradient( to bottom, transparent, var( --siteBackgroundColor ) );
  opacity : 1 !important;
  
  }

95262875_ScreenShot2022-09-14at1_03_26PM.png.eba15a5165fb0e3b763210b35fe2b18b.png

This is for v7.1 and specific to the posters need.

Let us know how it goes.

Edited by creedon
version 2

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

@creedon you are the man! Thanks so much!

It looks amazing on the screenshot you provided, but unfortunately, when I plug that CSS code in, the opacity of the gray overlay never quite reaches 100%. Can you see what I'm talking about in my screenshot? Any ideas what would be keeping it from getting to 100% opacity?

Screen Shot 2022-09-15 at 3.37.51 PM.png

Link to comment
  • 10 months later...
3 hours ago, LucasPhotography said:

Do you think you could help me out real quick?

Add the following to Design > Custom CSS.

[data-section-id="64bfcf0a89380d3e7951a6e9"] .section-border {

  background : linear-gradient( to top, transparent, var( --siteBackgroundColor ) );
  
  }

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Site: https://www.uarizonasme.com/

Password: squash

I'm trying to apply a code to the CSS so I can get a gradient between two different colors: #049c4c and #043c64. (I'm using verion 7.1). This is the code I have so far: 

section, section .section-background, #header {
  background-color: #043c64 !important; 
}
.bright-inverse:not(.has-background) .section-background {
  background: #049c4c;
}

The code is applying to all the sections (not including the header), but I just want apply the gradient between these two sections:

new.PNG

Edited by reyclark
Link to comment
24 minutes ago, LucasPhotography said:

as far as I can tell, it didn't change anything.

It is. Notice the color difference between the top on bottom colors of the section.

image.png.42d20dd065790e460889a0ff9a513010.png

25 minutes ago, LucasPhotography said:

Did I do something wrong?

Not as far as adding the code.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 2 weeks later...
2 hours ago, hjeeee said:

How do you even know which html tag name to use for custom CSS?

I learned HTML, CSS, how to use a web browser's inspector, among other web and computer technologies.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.