Jump to content

How to make "simple list" images clickable?

Recommended Posts

Posted

Site URL: https://mahalavi.squarespace.com

web password: maha

I'm trying to see if there is a way for the List Section to be clickable by image? I know that the other way is to use a List Summary but it doesn't work as well (List section images are more responsive as it is in three columns, whereas the List summary images are not). If anyone has a CSS that could help me to link each of the images here I would be very grateful!!!!

image.thumb.png.4ff808ba20fb477396047c69252f662a.png

 

Posted

Nevermind I found the code through one of your old responses 🙂 

For anyone wondering:

 

First, add buttons, then Use this code (Design > Custom CSS)

/* Make list images clickable */
li.list-item {
    position: relative !important;
}
.list-item-content__button-container {
    position: absolute !important;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
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;
} 
  • 1 year later...
Posted
On 6/1/2022 at 12:47 PM, magneticnorth said:

Nevermind I found the code through one of your old responses 🙂 

For anyone wondering:

 

First, add buttons, then Use this code (Design > Custom CSS)

/* Make list images clickable */
li.list-item {
    position: relative !important;
}
.list-item-content__button-container {
    position: absolute !important;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
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;
} 

Is there a way to only make this change for a specific item section alone? I found a section id something like this, section[data-section-id="651bf9672771553120576277"] But I don't know how to adjust to code to only apply the "hide button"-change to that section alone. Thanks!

Posted
On 10/3/2023 at 8:59 PM, Nhan said:

Is there a way to only make this change for a specific item section alone? I found a section id something like this, section[data-section-id="651bf9672771553120576277"] But I don't know how to adjust to code to only apply the "hide button"-change to that section alone. Thanks!

Change code to this

section[data-section-id="651bf9672771553120576277"] {
li.list-item {
    position: relative !important;
}
.list-item-content__button-container {
    position: absolute !important;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
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;
} 
}

 

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

  • 3 months later...
Posted

Hello!  I have a simple list on my homepage, each item has a dedicated image and button that directs users to the assigned page. The button is clickable, but the image is not. How do I make the image clickable to the same link as the button? 

*each button links to a different page on the site*

TIA!!

groundforce-civil.squarespace.com

Posted

This is super helpful as I am trying to make images clickable in simple list. However, I dont want to hide the button, I want to keep the button but just make the image above each button, clickable to the specific URL that the button is. I also want a small zoom effect when hovering. 

Can someone help?

https://groundforce-civil.squarespace.com/

Posted
On 1/14/2024 at 7:11 AM, SanBaz88 said:

This is super helpful as I am trying to make images clickable in simple list. However, I dont want to hide the button, I want to keep the button but just make the image above each button, clickable to the specific URL that the button is. I also want a small zoom effect when hovering. 

Can someone help?

https://groundforce-civil.squarespace.com/

You can use this code

https://sf.digital/squarespace-solutions/make-squarespace-list-items-clickable

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.