Jefferson0123 Posted December 8, 2023 Posted December 8, 2023 Hello, I need to create a fixed call to action button that appears on all pages of the website on the bottom right (and hovers as you scroll up or down on webpages). I need customers to very easily find the contact section. The button needs to take people to the Contact page. I've done a mockup of how I want this to look (on bottom right of both screenshots) but I do need the button to be narrower in width so it isn't too clunky. Would really appreciate your help.
Solution tuanphan Posted December 10, 2023 Solution Posted December 10, 2023 Add this code to Website Tools (under Not Linked) > Code Injection > Footer <a href="https://google.com" class="tp-button">Contact</a> <style> a.tp-button { background-color: #89b36a !important; color: white !important; padding: 20px 30px; border-radius: 50px; position: fixed; bottom: 20px; right: 20px; z-index: 9999 } </style> Replace google with contact page url If your Plan doesn't support Code Injection, you can add a Code Block to Site Footer then add the code If the code doesn't work, please add & keep the code then share site url, we can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Jefferson0123 Posted December 11, 2023 Author Posted December 11, 2023 That worked! Thank you so much. tuanphan 1
Jefferson0123 Posted December 12, 2023 Author Posted December 12, 2023 Hi again, I want to ensure the above button is noticeable – do you have some codes I can use to add some animation like a wiggle effect or a flashing effect?
tuanphan Posted December 12, 2023 Posted December 12, 2023 use new code, if it doesn't work, please share site url, I can check easier <a href="https://google.com" class="tp-button">Contact</a> <style> a.tp-button { background-color: #89b36a !important; color: white !important; padding: 20px 30px; border-radius: 50px; position: fixed; bottom: 20px; right: 20px; z-index: 9999; -webkit-animation: mover 1s infinite alternate; animation: mover 1s infinite alternate; } @-webkit-keyframes mover { 0% { transform: translateY(0); } 100% { transform: translateY(-10px); } } @keyframes mover { 0% { transform: translateY(0); } 100% { transform: translateY(-10px); } } </style> It will make button down up down up down up down up down up... Demo: https://codepen.io/jaabert/pen/gObMGBV Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Jefferson0123 Posted December 12, 2023 Author Posted December 12, 2023 (edited) That's brilliant and it works well. Thank you. Is it possible to add in a hover colour like the other buttons on the website? Edited December 12, 2023 by Jefferson0123
tuanphan Posted December 13, 2023 Posted December 13, 2023 18 hours ago, Jefferson0123 said: That's brilliant and it works well. Thank you. Is it possible to add in a hover colour like the other buttons on the website? How hover? Can you share link to your site? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Jefferson0123 Posted December 14, 2023 Author Posted December 14, 2023 Here's the link to my website: https://olive-glockenspiel-gbhp.squarespace.com I'd like the new Contact Us bottom (bottom right of webpage) to darken slightly when you hover over it. Like how the other CTA buttons are on the website.
tuanphan Posted December 16, 2023 Posted December 16, 2023 On 12/15/2023 at 1:36 AM, Jefferson0123 said: Here's the link to my website: https://olive-glockenspiel-gbhp.squarespace.com I'd like the new Contact Us bottom (bottom right of webpage) to darken slightly when you hover over it. Like how the other CTA buttons are on the website. Add this code under <style> a.tp-button:hover { opacity: 0.8; } </style> Jefferson0123 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment