tdm91 Posted August 5, 2022 Share Posted August 5, 2022 Site URL: https://hooshdesigns.com.au/community-copy Hi all, Since some changes to Squarespace, I've been struggling to implement the text and colour overlay on hover to image blocks. On the page I'm working on, I have a row of six images with text blocks and accordions below them, and I'm looking to add a text and colour overlay on hover to each of the six images. I have been using different code I've found elsewhere, but have not been able to crack it. The effect I'm after is essentially this one, but I'm having trouble targeting classes/id's to make it work. https://www.w3schools.com/howto/howto_css_image_overlay.asp If anyone has any suggestions, I would be hugely appreciative! Link to comment
Solution Beyondspace Posted August 6, 2022 Solution Share Posted August 6, 2022 On 8/5/2022 at 12:46 PM, tdm91 said: Site URL: https://hooshdesigns.com.au/community-copy Hi all, Since some changes to Squarespace, I've been struggling to implement the text and colour overlay on hover to image blocks. On the page I'm working on, I have a row of six images with text blocks and accordions below them, and I'm looking to add a text and colour overlay on hover to each of the six images. I have been using different code I've found elsewhere, but have not been able to crack it. The effect I'm after is essentially this one, but I'm having trouble targeting classes/id's to make it work. https://www.w3schools.com/howto/howto_css_image_overlay.asp If anyone has any suggestions, I would be hugely appreciative! You can try adding to Home > Design > Custom Css section[data-section-id="62eca74a6d9b2e0497d75203"] .image-block .content-fill:after { content:'Here is the title'; color: #fff; /*color of title overlay*/ display: flex; justify-content:center; align-items: center; background: rgba(0,0,0,0.3); /*background color overlay*/ width: 100%; height: 100%; position: absolute; opacity: 0; transition: opacity 0.5s; } section[data-section-id="62eca74a6d9b2e0497d75203"] .image-block:hover .content-fill:after{ opacity: 1; } Let me know how it works on your site Support me by pressing 👍 if this useful for you BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Beyondspace Posted August 6, 2022 Share Posted August 6, 2022 My testing BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
tdm91 Posted August 11, 2022 Author Share Posted August 11, 2022 Thank you so much @bangank36! Exactly what I was looking for. Really appreciate it! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment