Jump to content

How to make list gallery images and text clickable--and hide button

Recommended Posts

Posted

Hello!

I'm trying to make the Simple List Gallery images and text below the image linked/clickable to other sections of a website I'm building. But I also need to hide the button. Can someone share how to do this?

I've reviewed a lot of the great information on the forum about this, but none of the CSS seems to work for my situation. I've been able to get the images and text linked--but it's been impossible to hide the button.

Thanks in advance! 

Screenshot 2023-02-04 at 11.12.30 AM.png

  • 2 months later...
Posted
On 4/29/2023 at 7:52 AM, BFGS said:

@tuanphan — I would love your assistance with this precise inquiry. The website link is: https://dove-nectarine-7dnb.squarespace.com/; the password for entry is rondoCLT23. The list section that I want clickable, while hiding the buttons, is the second section of the homepage (screenshot attached).

Thank you so much for your help 🙂 

Screen Shot 2023-04-28 at 7.51.36 PM.png

It looks like you changed layout?

If you use List in future, you can add this to Design > Custom CSS

li.list-item {
    position: relative;
}
.list-item-content__button-container {
    position: static;
}
a.list-item-content__button.sqs-block-button-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    color: transparent !important;
    background-color: transparent !important;
    border: none !important;
}
.list-item-content__button-container {
    position: static !important;
transform: unset !important;
}
a.list-item-content__button.sqs-block-button-element:before {
    visibility: hidden;
}

 

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

  • 9 months later...
Posted (edited)
On 5/1/2023 at 3:05 AM, tuanphan said:

It looks like you changed layout?

If you use List in future, you can add this to Design > Custom CSS

li.list-item {
    position: relative;
}
.list-item-content__button-container {
    position: static;
}
a.list-item-content__button.sqs-block-button-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    color: transparent !important;
    background-color: transparent !important;
    border: none !important;
}
.list-item-content__button-container {
    position: static !important;
transform: unset !important;
}
a.list-item-content__button.sqs-block-button-element:before {
    visibility: hidden;
}

 

 

Hi,

First of all, thank you for this code.  I have been using it for a month or so, now.  However (ah, so that's why you're here!), it seems to have stopped working, at least for my site.  Just wondering if it's an isolated issue or a global problem?

I've noticed the default on-hover behaviour for products lists has changed recently.  On Android devices, the alt image is attempting to load in the products list on hover, but it loads a blank.  I've raised this with SS support and proven it not to be my site or device.

Now wondering if a SS back-end change may have affected the list hover behaviour in general.

Would anyone be kind enough to take a look at my site and test, please?

The issue is with the six list items at the bottom of my home page.  On mobile (Android), it seems okay but on desktop (Windows runinng Chrome or Firefox), hovering over the image and title text doesn't respond as a button, as it did previously.  Hovering just below the title does.

Any help would be greatly appreciated. 

Best wishes, James

 

www.jamesgadbury.com
password: Gadders

 

Edited by James-Gadbury
added site web link
Posted

Some code overrides this line

image.png.d6d7b535c1261c47f588b8ac2e25d38e.png

change it to this

a.list-item-content__button.sqs-block-button-element {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    color: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

(I added !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)

Thank you so much @tuanphan for helping me resolve this, and for pointing out the reason and the required change. 

I have enough information to go back to see what was happening for my own learning / understanding.  I would have been stumped a while.  I use Chrome's dev tools but often it's a bit trial and error.

EDIT: having taken a look at my code, I cannot see that I had added any code to break this and cause the position override.  Is it more likely that a 'behind the scenes' change caused this, and not something I did?  The goal for me is to know when I've done something stupid... which may be too often!

I can see where the override was, and toggle the position override to enable / disable the original issue, but I cannot work out where the override was originating from.

 

list button position override.png

Edited by James-Gadbury
added override pic
Posted
On 2/8/2024 at 7:12 PM, James-Gadbury said:

Thank you so much @tuanphan for helping me resolve this, and for pointing out the reason and the required change. 

I have enough information to go back to see what was happening for my own learning / understanding.  I would have been stumped a while.  I use Chrome's dev tools but often it's a bit trial and error.

EDIT: having taken a look at my code, I cannot see that I had added any code to break this and cause the position override.  Is it more likely that a 'behind the scenes' change caused this, and not something I did?  The goal for me is to know when I've done something stupid... which may be too often!

I can see where the override was, and toggle the position override to enable / disable the original issue, but I cannot work out where the override was originating from.

 

list button position override.png

This position: relative, I think from some Animations option, so you try checking in Site Styles > Animations

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

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.