Jump to content

Code for Sticky overlapping sections not working

Recommended Posts

Hello,

 

I am using a code I found here on the forum for sticky overlapping sections and it seems to be working for some people but not for me. The site is celery-garlic-dt6m.squarespace.com 

I am trying to make the first section (hero banner) sticky and the 4 following sections below it, as a list of my services. I have tried with the z-index at 0,1,10 and 999. Nothing works! Here is the code I am using for each section:

//sticky services//
section[data-section-id="6500ed413f46670e39fdfe49"] .page-section {
 position:sticky!important; 
 top:0px!important;
  z-index:999!important;
}

Link to comment
  • Replies 2
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

4 hours ago, byboldstudio said:

Hello,

 

I am using a code I found here on the forum for sticky overlapping sections and it seems to be working for some people but not for me. The site is celery-garlic-dt6m.squarespace.com 

I am trying to make the first section (hero banner) sticky and the 4 following sections below it, as a list of my services. I have tried with the z-index at 0,1,10 and 999. Nothing works! Here is the code I am using for each section:

//sticky services//
section[data-section-id="6500ed413f46670e39fdfe49"] .page-section {
 position:sticky!important; 
 top:0px!important;
  z-index:999!important;
}

The first section cover almost 100% view

image.thumb.png.59fae90fbcb1031205e2b9da14290c93.png

If we set stick/fixed for first section, we can not see the below sections. Can you describe more detail your idea?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace (+100 Spark plugin customisations)
🥳 Freemium Squarespace Widget Templates (+1000 Elfsight 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
11 hours ago, Beyondspace said:

The first section cover almost 100% view

image.thumb.png.59fae90fbcb1031205e2b9da14290c93.png

If we set stick/fixed for first section, we can not see the below sections. Can you describe more detail your idea?

It doesn't have to be necessarily on the first section if it's not possible. I want at least the 4 sections below to stack between each other by overlapping one on top of the others, as those are the lists of my services. I also tried just doing those with the code but it doesn't work

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.