Jump to content

Fixed Call to Action Button

Go to solution Solved by tuanphan,

Recommended Posts

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.

Screenshot 2023-12-08 at 14.15.42.png

Screenshot 2023-12-08 at 14.20.43.png

Link to comment
  • Solution

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!)

Link to comment

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!)

Link to comment
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>

 

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!)

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.