Jump to content

Sticky element not working

Recommended Posts

Hi im having issue with a sticky element not working.  Not sure what the problem is. below is the code and a screengrab of whats happening.  any ideas?

 

https://blueberry-carrot-xawg.squarespace.com/narrative-copy-1

pw codeblock

 

<html>
<div id="sidetitle1">
    <p style="letter-spacing:35px; opacity:100%; color:white; font-size:150%; font-family:lato; font-weight:600;">NARRATIVE</p>
  </div>
</html>

<style>
  #sidetitle1 {
  display: flex;
  position: sticky !important;
  position: -webkit-sticky !important;
  text-shadow: 1px 1px 10px #000 !important;
  writing-mode: vertical-lr; 
  text-orientation: upright;
  width: 25px;
  height: 100px;
  top:0px !important;
  z-index: 99999;
}
</style>

 

Link to comment
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

56 minutes ago, joshuaechevarriadop said:

Hi im having issue with a sticky element not working.  Not sure what the problem is. below is the code and a screengrab of whats happening.  any ideas?

 

https://blueberry-carrot-xawg.squarespace.com/narrative-copy-1

pw codeblock

 

<html>
<div id="sidetitle1">
    <p style="letter-spacing:35px; opacity:100%; color:white; font-size:150%; font-family:lato; font-weight:600;">NARRATIVE</p>
  </div>
</html>

<style>
  #sidetitle1 {
  display: flex;
  position: sticky !important;
  position: -webkit-sticky !important;
  text-shadow: 1px 1px 10px #000 !important;
  writing-mode: vertical-lr; 
  text-orientation: upright;
  width: 25px;
  height: 100px;
  top:0px !important;
  z-index: 99999;
}
</style>

 

149486028_ScreenRecording2022-12-07at8_00_47AM.mov

How do you want it to sticky? Do you mean fixing this element on a fixed position?

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

Try changing this line:

position: sticky !important;

to:

position: fixed;

And adjust the top property to suit, probably about forty pixels.

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

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
🔌
 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 Did I help? Buy me a coffee?

Link to comment

May be you can try

.fe-block-fdf87f3b28856d0d23e5 {
  position: sticky;
  top: 30px;
  height: 1px;
}

Hope it can help

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

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.