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 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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 useful to you. Thanks!

Zygmunt Spray
Squarespace Website Designer
Contact me: https://squarefortytwo.com/ 
🔌Ghost Squarespace Plugins (Referral link)
Buy me a coffee

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.