Jump to content

Coding a Floating 'Book now' image

Go to solution Solved by tuanphan,

Recommended Posts

  • Replies 10
  • Views 499
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

Try adding to Design > Custom CSS

/* Floating image */
div#block-yui_3_17_2_1_1662717789426_6666 {
    position: fixed;
    left: 10px;
    top: 50%;
    max-width: 150px;
    transform: translateY(-50%);
    z-index: 9999999;
}
footer.sections {
    z-index: 9999999 !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!)

Link to comment
  • 3 weeks later...

Hi, the image is rather temperamental and is sometimes visible and other times not.  Is there a way to make sure it is constantly on screen and visible. 

 

website: www.virtuallygolf.co.uk

Image is with link in footer (block-yui_3_17_2_1_1662648844311_924264) and code below in custom CSS to make it float:-

Line: 572

Code: 

div#block-yui_3_17_2_1_1662648844311_924264 {
    position: fixed;
    left: 245px;
    top: 10%;
    max-width: 128px;
    transform: translateY(-50%);
    z-index: 9999999;
}
footer.sections {
    z-index: 9999999 !important;
}

 

Thank you

Link to comment
17 hours ago, VirtuallyGolf said:

Hi, the image is rather temperamental and is sometimes visible and other times not.  Is there a way to make sure it is constantly on screen and visible. 

 

website: www.virtuallygolf.co.uk

Image is with link in footer (block-yui_3_17_2_1_1662648844311_924264) and code below in custom CSS to make it float:-

Line: 572

Code: 

div#block-yui_3_17_2_1_1662648844311_924264 {
    position: fixed;
    left: 245px;
    top: 10%;
    max-width: 128px;
    transform: translateY(-50%);
    z-index: 9999999;
}
footer.sections {
    z-index: 9999999 !important;
}

 

Thank you

Image shows fine to me. Can you describe in more detail?

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

Yes I've changed the image and it seems to be ok.  However, now when I hover over images with links (desktop or mobile)  some don't work on the image but just to the side.

 

Is there a reason why some images would do this?

 

A good example is the floating images on the left of the website.  Christmas button only seem to work if you tap to the right, corporate button is fine and Booking Page button doesn't seem to work at all.  All have links to them.  This happens on most pages, some work and some don't.

 

Website: www.virtuallygolf.co.uk

 

Link to comment
On 9/28/2022 at 4:18 PM, VirtuallyGolf said:

Yes I've changed the image and it seems to be ok.  However, now when I hover over images with links (desktop or mobile)  some don't work on the image but just to the side.

 

Is there a reason why some images would do this?

 

A good example is the floating images on the left of the website.  Christmas button only seem to work if you tap to the right, corporate button is fine and Booking Page button doesn't seem to work at all.  All have links to them.  This happens on most pages, some work and some don't.

 

Website: www.virtuallygolf.co.uk

 

You can remove space inside images

eg this

image.thumb.png.bf34fc6ae32cebc38ba8ab3883b1f97e.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!)

Link to comment
  • 1 month later...
On 11/14/2022 at 6:20 PM, VirtuallyGolf said:

Thank you for this, all seems to be working now.

 

Is it possible to only allow the 'Book Now' image to appear on certain pages?  I need to disable it on the pages:

Booking page and Members Page

Add to 2 Pages Header 

<style>
  div#block-4bf0d701df8a3bc965d5 {
    display: none !important;
}
</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.