Jump to content

Floating Button Bottom Right Corner

Go to solution Solved by tuanphan,

Recommended Posts

Posted

Hi,

Could someone please provide me with some code to create a floating button (not 100% sure if a floating button is what I'm after, I've attached a screenshot of something I am needing) in the bottom right-hand corner as a 'make a booking' call-to-action?

I've tried to follow a dozen tutorials however I just can't quite get it right. Originally I created the button just in a random section and used some code in the css section of the design page, however using z-index just made it cover the entire screen and wasn't positioned in the bottom right-hand corner. Followed a diff tutorial that had me make in the footer and use code injection, this still hasn't worked. Any assistance would be gladly appreciated before I pull all of my hair out 🙂 Ideally I'd love for it to be on most pages but not every page, however, more than ok if it needs to be on every page, so long as as you're scrolling down any of the given pages it is present in the bottom right-hand corne.

url is https://www.sattvaspa.com.au/

Thanks so much xScreenshot2023-05-31at12_06_32am.thumb.png.9a9900c8afe59e0ca7eb9c15133324c2.pngScreenshot2023-05-31at12_06_00am.thumb.png.8321efe890a32b5bf087b453dc50a52b.png

Posted
On 6/5/2023 at 5:22 PM, Rubykatedesign23 said:

Thank you so much. I've added the 'make a booking' button in the footer now 🙂

image.thumb.png.4e17fe1b462800816d96d681aa35395a.png

Add to Design > Custom CSS

footer.sections .button-block {
    position: fixed;
    bottom: 3vw;
    right: 3vw;
   width: 200px;
    height: 50px;
    display: block !important;
    z-index: 99999;
}
footer.sections section, footer.sections {
    z-index: 99999 !important;
}

 

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

Posted (edited)

@tuanphan I was just wondering if it's possible to have a floating button not on the overlay menu for mobile? I'd love it not to be on the homepage on desktop either, but that's not a big deal. Unfortunately the client isn't so keen on there being a 'make a booking' button onto of the 'book now' button. I've tried all different menu alignments, but no deal for client. I had been originally trying to get some code that can be injected onto 3 specific pages, however the code didn't work/the floating button was turned on the side and not in the bottom righthand corner. Unless this is doable? Thank you SO much in advance for any insight/assistance.

Screenshots - the page titled ''treatment's' shows how useful it is having that button for this page, as it's too much text for a customer to scroll alllll the way down to the bottom or to have to scroll up for the 'book now' button to show in the header (this also doesn't even work on mobile etc) image.thumb.png.1ba6eb65407506cdc716e9ca7b99a9fa.png

Second screenshot just shows the overlapping 'booking' buttons which is just too much unfortunately.

image.thumb.png.1b901846db4af0511d5f2240c8ccf468.png

Last screenshot shows a spa website called 'comma' which is where the inspo for the floating booking button came from. I'm guessing this website hasn't been created in Squarespace as the 'book now' button down the very bottom is much better, and their overlay menu is farrrrr better than Squarespace's shit limitations for mobile ughhhhh. I already know the answer is going to be no, but just incase -  a 'BOOK NOW' block button like this isnt possible is it?

image.thumb.jpeg.76ac10e0387cbdc9224c342e18b89f44.jpeg

Edited by Rubykatedesign23
  • Solution
Posted

Add to Design > Custom CSS

body.header--menu-open a.btn {
    visibility: hidden;
}
@media screen and (max-width:767px) {
  div#block-yui_3_17_2_1_1685518172534_2669 a {
    position: fixed;
    bottom: 0;
    width: 100%;
    left: 0;
    padding: 10px 20px !important;
    height: auto !important;
    display: flex !important;
    border-radius: 0 !important;
}  
}

 

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

  • 1 year later...
Posted
On 6/8/2023 at 9:33 AM, tuanphan said:

Add to Design > Custom CSS

footer.sections .button-block {
    position: fixed;
    bottom: 3vw;
    right: 3vw;
   width: 200px;
    height: 50px;
    display: block !important;
    z-index: 99999;
}
footer.sections section, footer.sections {
    z-index: 99999 !important;
}

 

Could this be edited in order to have two floating buttons?

Posted
On 10/9/2024 at 9:59 PM, HeatherM1234 said:

Could this be edited in order to have two floating buttons?

Yes. You can add 2 buttons to Footer and we can target ID. You can add then share site url, I will give you code. 

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

Posted
On 10/14/2024 at 4:11 AM, HeatherM1234 said:

Ok I've added the second button, the url is www.studio48surrey.com

 

Thank you!

You can use this to Website Tools > Custom CSS

#block-yui_3_17_2_1_1728047507496_17724, #block-yui_3_17_2_1_1728853644148_7931 {
    position: fixed;
    bottom: 3vw;
    right: 3vw;
    width: 200px;
    height: 50px;
    display: block !important;
    z-index: 99999;
}
footer.sections section, footer.sections {
    z-index: 99999 !important;
}
/* Call Now */
#block-yui_3_17_2_1_1728853644148_7931 {
    bottom: 7vw;
}

image.thumb.png.4a8d8119a3e4bbd44fda0a6d7d57b0b2.png

Result

image.png.ee3587fcfd40421ec7d3a0f23e64874e.png

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

Posted
3 hours ago, HeatherM1234 said:

Fantastic thank you! Im finding the buttons are stacked overlapping each other on mobile view though? Is there a way to separate them?

Add this extra CSS

@media screen and (max-width:767px) {
    #block-yui_3_17_2_1_1728853644148_7931 {
        bottom: 20vw !important;
    }
}

image.png.ce47ebdb0663210a904dc23bec74ff42.png

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

Posted
On 10/25/2024 at 4:15 AM, andrayxz said:

Site URL: https://www.innovation-practice.com/

The overlay floating button code shared here, we cannot make it work on our website: https://www.innovation-practice.com/ The button that we try to make floating is the Let's Connect button at the very bottom. 

With your site, you can use this CSS code

div#block-yui_3_17_2_1_1729686537714_2547 {
    position: fixed;
    bottom: 3vw;
    right: 0;
    height: 50px;
    display: block !important;
    z-index: 99999;
}
div#block-yui_3_17_2_1_1729686537714_2547 div {
    text-align: right;
}

image.png.eb30ed5586f336945b6992e01372e6da.png

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

  • 5 weeks later...

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.