MarianaGR Posted August 30, 2022 Share Posted August 30, 2022 Site URL: https://www.azulstudio.co.uk/ Hello! my site URL is https://www.azulstudio.co.uk I am trying to add the colour + text overlay effect when hovering over the images on the "work" section. For example, when hovering over the first picture on the right of "WORK" I would like it to be covered with a solid color rgb (100,39,39) and a title to appear (in this case "Decorex 2021). I have tried several tutorials but none of them are working, as I feel that I am not targeting the specific image correctly. Any help is very much appreciated! thank you! Mariana Link to comment
tuanphan Posted August 30, 2022 Share Posted August 30, 2022 (edited) Try adding this to Design > Custom CSS. If it works, I will send quick guide for other images div#block-yui_3_17_2_1_1661175829962_534783 { .sqs-image-content:after { content: "Decorex 2021"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 100%; text-align: center; color: white; z-index: 99999; font-size: 30px; opacity: 0; background-color: transparent; transition: all 0.3s; pointer-events: none; } .sqs-image-content { position: relative; } .sqs-image-content:before { content: ""; background-color: rgba(100,39,39,0.5); position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 99; opacity: 0; transition: all 0.3s; pointer-events: none; } &:hover .sqs-image-content:before, &:hover .sqs-image-content:after{ opacity: 1; transition: all 0.3s; }} Edited August 31, 2022 by tuanphan Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
MarianaGR Posted August 30, 2022 Author Share Posted August 30, 2022 Hi Tuanphan! IT WORKED!! I just changed a few things regarding the colour and fonts but it's perfect! Could you show me how to apply it to the other images as well? THANK YOU AGAIN!!!! M Link to comment
MarianaGR Posted August 30, 2022 Author Share Posted August 30, 2022 Hi again! I just realized that the image link does not longer work when the hover effect is applied. Is there a way to solve that? thank you! M Link to comment
tuanphan Posted August 31, 2022 Share Posted August 31, 2022 18 hours ago, MarianaGR said: Hi again! I just realized that the image link does not longer work when the hover effect is applied. Is there a way to solve that? thank you! M Updated the code. You can check again. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
MarianaGR Posted August 31, 2022 Author Share Posted August 31, 2022 amazing! it's working now, thank you for solving this. last question, do I have to copy and modify the code for each one of the images on the block? or is there a quicker way to do it? thanks again tuanphan! Link to comment
MarianaGR Posted August 31, 2022 Author Share Posted August 31, 2022 also, is there a way for the hover effect to work on mobiles? thank you again! Link to comment
paul2009 Posted August 31, 2022 Share Posted August 31, 2022 38 minutes ago, MarianaGR said: is there a way for the hover effect to work on mobiles? Mobile devices don't have a hover state because there is no pointer device like a mouse. It's best to avoid using hover effects now that mobile devices represent more than 50% of site traffic. tuanphan 1 About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. Content: Links in my posts may refer to SF Digital products or may be affiliate links. Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.Improve your online store with our extensions. 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