Jump to content

How to centre button on site – Embedded Script

Go to solution Solved by Ziggy,

Recommended Posts

I've embedded this script which creates a booking button for a 3rd party system.
However the button sits left aligned in the content box and I don't know enough to edit it to have it centred.
The button sits in the middle of the site, so scalling makes it jump around a lot. Help?

Here's the site

https://www.charlottecummings.nz/

<script id="setmore_script" type="text/javascript" src="https://my.setmore.com/webapp/js/src/others/setmore_iframe.js"></script><a id="Setmore_button_iframe" class="" style="float:none" href="https://booking.setmore.com/scheduleappointment/45f0b7ef-cae6-4d0c-8808-1354daa6242c"><img border="none" src="https://storage.googleapis.com/full-assets/setmore/images/1.0/Settings/book-now-blue.svg" alt="Book an appointment with Charlotte Cummings using Setmore" /></a>


 

Edited by Timboandco
Adding URL
Link to comment
  • Replies 1
  • Views 228
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

Typically simply containing the button script in <center> tags works, like this:

<center>
  <script id="setmore_script" type="text/javascript" src="https://my.setmore.com/webapp/js/src/others/setmore_iframe.js"></script><a id="Setmore_button_iframe" class="" style="float:none" href="https://booking.setmore.com/scheduleappointment/45f0b7ef-cae6-4d0c-8808-1354daa6242c"><img border="none" src="https://storage.googleapis.com/full-assets/setmore/images/1.0/Settings/book-now-blue.svg" alt="Book an appointment with Charlotte Cummings using Setmore" /></a>
</center

I would recommend that you make the code block that contains this button the full width of the canvas.

Let me know if that works

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.