Jump to content

Sticky overlay scroll cutting off content

Recommended Posts

Hi - Im new to css and ran into a hiccup. I have a code to create a sticky effect for the page sections. However, it cuts off a section "How to..." and the top of the section remains sticky while scrolling - not displaying full section - until the next section is scrolling up, in this case "FAQ."

How can i fix this?

Here's the code:

#page .page-section {position: sticky!important; top: 0px!important}
html {scroll-behavior: smooth}

Link to comment
  • Replies 3
  • Views 331
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Can you share your website URL?

7 hours ago, WorkflowbyJo said:

#page .page-section {position: sticky!important; top: 0px!important}

This code is very generic, it will apply in some way to your whole site, you need to use this in conjunction with a section identifier to target it very specifically. Applying: top: 0px!important globally will be why you are seeing problems.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
  • 2 months later...

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.