ZuzanaFENIX Posted February 23 Share Posted February 23 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
Solution Ziggy Posted February 23 Solution Share Posted February 23 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 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) ✨ Spark Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
ZuzanaFENIX Posted February 24 Author Share Posted February 24 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! Ziggy 1 Link to comment
Ziggy Posted February 24 Share Posted February 24 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 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) ✨ Spark Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment