Jump to content

floating button not on top of sections

Go to solution Solved by Ziggy,

Recommended Posts

Hi all, 

We have added a floating button based on some code snippets on the forum, all works except for the position - it is covered by some sections when scrolling (we tried setting z-position to different numbers but none worked).

Can somebody please advise?

Thank you!

 

Code on page:

<a href="https://www.newtonenergy.nl/how-to-preorder" class="sqs-block-button-element sqs-block-button-element" id="back-to-top">Pre-order now!</a>

Code in CSS:

#back-to-top{
position:fixed!important;
  top:50%!important; 
  right:0!important; 
 z-index: 99999!important;
  transform: translateY(-50%);
font-size: 1.1em;
background: #C42F35;
color: #fff;
text-transform: uppercase;
font-family: montserrat!important;
writing-mode: vertical-rl;
padding: 40px 20px;
}

 

 

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

Top Posters In This Topic

  • Solution
12 minutes ago, ZuzanaFENIX said:

Code on page:

Where have you add this code to the page? Generally, the best place for this is at the very last section of the footer (if you want it on every page) or in the last section on the page (if you just want it on one page).

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
20 hours ago, Ziggy said:

Where have you add this code to the page? Generally, the best place for this is at the very last section of the footer (if you want it on every page) or in the last section on the page (if you just want it on one page).

Thank you so much, moved it to the last section and it worked perfectly! Simple solution! 

Link to comment
3 hours ago, ZuzanaFENIX said:

Simple solution! 

These are my favourite type of solution!

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

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.