Jump to content

how to convert an image into a rollover / button in a SS section

Go to solution Solved by tuanphan,

Recommended Posts

Hello

please see the midd section of the homepage ''Properties'' on blue bkg.

https://ducarealestate.squarespace.com/home

I would like to get rid of the buttons/link and have the dutone image to act as a button, with a full colour image on hover and link to the relative page. Is that possible?

I believe the section module I used is considered a ''LIST'' but I have tried a few lines of CSS code to no avail,

TIA

nana

Edited by nana2023
forgot to paste the url
Link to comment

You can use this to make each "card" clickable:

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

You can achieve a hover effect for the image, but you would need to start with a full-colour image and use filter and overlay in CSS to add/remove on hover the color effect, roughly this technique:

 

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
  • Solution

You can use this code to Website Tools > Custom CSS

[data-section-id="64b8c4a558bd0623e363bda6"] {
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;
}
.user-items-list-carousel__slide {
    pointer-events: initial !important;
    user-select: unset !important;
}
.user-items-list-carousel__gutter {
    cursor: pointer;
}
li:hover img {
    filter: grayscale(1);
}}

 

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.