Jump to content

How to Make a Fixed Call to Action Button

Go to solution Solved by paul2009,

Recommended Posts

Posted

Hello there!

I'm trying to add a fixed CTA (Book Now) on the lower right side of my website. Through tutorials I found online, I was able to add the button but my problem is, I can't seem to figure out how I can make the size and positioning the same on desktop and mobile view. Please help.

Attached is a sample website which uses fixed CTA. I'm hoping I can replicate this in my website with my brand colors and fonts.image.thumb.png.13343e34a1cd1f61e9e279d5ec2bbdd5.png

Posted
5 hours ago, MiaP said:

Hello there!

I'm trying to add a fixed CTA (Book Now) on the lower right side of my website. Through tutorials I found online, I was able to add the button but my problem is, I can't seem to figure out how I can make the size and positioning the same on desktop and mobile view. Please help.

Attached is a sample website which uses fixed CTA. I'm hoping I can replicate this in my website with my brand colors and fonts.image.thumb.png.13343e34a1cd1f61e9e279d5ec2bbdd5.png

Can you share your URL so I can take a look?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

  • Solution
Posted
On 2/6/2023 at 9:56 AM, MiaP said:

I'm trying to add a fixed CTA (Book Now) on the lower right side of my website.

Try adding this to Settings > Advanced > Code InjectionFOOTER:, changing /classes to match the URL that you want to reach:

<div id="btnFloatBook">
  <a style="position: fixed; z-index: 100; bottom: 1em; right: 1em;  padding: 1em 2em; box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px;"
   href="/classes" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element">Book Now</a>
</div>

Screenshot when added:

image.thumb.gif.d542e803789c516e586fc90e475d5248.gif

Did this help? Please give feedback by clicking an icon below  ⬇️

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

  • 5 months later...
Posted
On 2/9/2023 at 4:47 AM, paul2009 said:

Try adding this to Settings > Advanced > Code InjectionFOOTER:, changing /classes to match the URL that you want to reach:

<div id="btnFloatBook">
  <a style="position: fixed; z-index: 100; bottom: 1em; right: 1em;  padding: 1em 2em; box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px;"
   href="/classes" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element">Book Now</a>
</div>

Screenshot when added:

image.thumb.gif.d542e803789c516e586fc90e475d5248.gif

Did this help? Please give feedback by clicking an icon below  ⬇️

Do you know how to link that CTA button to a phone number or a page as well?

Posted
14 minutes ago, ashleylee said:

Do you know how to link that CTA button to a phone number or a page as well?

The solution I provided above links to the classes page because of this:

href="/classes"

You can link to any other page by changing this URL. To link to a phone number, you'll use href attribute tel: like this:

href="tel:+1234567890"

Did this help? Please give feedback by clicking an icon below ⬇️

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

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.