Jump to content

Gradient Overlay Between Sections

Go to solution Solved by DPruitt,

Recommended Posts

I would like to add a gradient overlay between sections, from the first section which contains a video background, to the one below, so that it ramps from transparent on top to hex #1c1c1c (the gray background below).

Any help is much appreciated! See screengrab mock for what I am thinking.

Screen Shot 2023-08-23 at 10.27.28 AM.png

Link to comment
  • Solution

Hey Mike!
Try this:

#collection-id
  #sections
  .page-section:nth-child(1):after
  {content:'';
  width: 100%;
  display:block;
  position: absolute;
  bottom:0px;
height: 70px;
    background: #1c1c1c;
background: linear-gradient(0deg, #1c1c1c 28%, rgba(28, 28, 28, 0) 100%);
  }

You can always toggle the height if it needs to be larger...  You'll also need to toggle the #collection-id to get the code to work specifically on your homepage so that other pages are not affected...  If you want it on all pages, simply remove #collection-id.

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.