ILB_Rivendell Posted January 17, 2023 Share Posted January 17, 2023 Hi I'm trying to create a hover overlay on all image blocks within my site. I want the images to have an opacity when you hover over them. I would be grateful for the CSS for this? Thanks Link to comment
Solution Ziggy Posted January 17, 2023 Solution Share Posted January 17, 2023 Add this to your Custom CSS: .sqs-image-content { opacity:1; transition:ease-in-out 300ms; &:hover { opacity:0.6; } } Adjust the opacity 0.6 to any value between 0 and 1. Hope that's what you're looking for! Give me a thumbs up if you can, thanks! ILB_Rivendell 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com ☕ Did I help? Buy me a coffee? 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) Link to comment
ILB_Rivendell Posted January 17, 2023 Author Share Posted January 17, 2023 Thank you so so much - that worked perfectly! Link to comment
lawilson97 Posted February 17, 2023 Share Posted February 17, 2023 Any way to make the image go lighter rather than darker? Link to comment
Ziggy Posted February 18, 2023 Share Posted February 18, 2023 14 hours ago, lawilson97 said: Any way to make the image go lighter rather than darker? The effect is for opacity, so will go lighter or darker depending on the underlying color, likely the section background. You could use this instead: .sqs-image-content { filter:brightness(1); transition:ease-in-out 300ms; &:hover { filter:brightness(0.5); } } Let me know if you prefer that. Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com ☕ Did I help? Buy me a coffee? 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) Link to comment
lawilson97 Posted February 22, 2023 Share Posted February 22, 2023 On 2/19/2023 at 1:13 AM, Ziggy said: The effect is for opacity, so will go lighter or darker depending on the underlying color, likely the section background. You could use this instead: .sqs-image-content { filter:brightness(1); transition:ease-in-out 300ms; &:hover { filter:brightness(0.5); } } Let me know if you prefer that. This is the one I ended up using: img { -webkit-transition: all 0.1s ease; transition: all 0.5s ease; } .gallery-grid-item img:hover { filter: brightness(109%) } It works really well as I needed it to work on the gallery block. Thanks so much though! Ziggy 1 Link to comment
Ziggy Posted February 22, 2023 Share Posted February 22, 2023 9 minutes ago, lawilson97 said: Thanks so much though! Not a problem! Could you give my post a thumbs up and mark it as the solution? Thanks! Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com ☕ Did I help? Buy me a coffee? 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) Link to comment
jjk291 Posted March 21, 2023 Share Posted March 21, 2023 Hi!! sorry to bump this, is there a way to apply this effect to only images that are links? Link to comment
tuanphan Posted March 25, 2023 Share Posted March 25, 2023 On 3/21/2023 at 7:39 AM, jjk291 said: Hi!! sorry to bump this, is there a way to apply this effect to only images that are links? Try this new code. If it doesn't work, please share link to page where you use image, we can check easier .sqs-image-content a { opacity:1; transition:ease-in-out 300ms; &:hover { opacity:0.6; } } ArcherDougherty 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
indigoRising Posted September 4, 2023 Share Posted September 4, 2023 I'm trying to get this effect with an image that has a text block on top of it. The issue is that the text block blocks the cursor and the hover doesn't register on the image. I tried doing it so that the text block contains the link, and has a background enabled, then applying the css to the text block's background color/opacity. The problem here is that the link is only on the text, so when someone clicks any area of the image that isn't the text, the link doesn't register, even if if image itself is linked. Then I tried making the text block smaller so that the image link will be exposed around it, but then that creates a deadzone between the image and the text where there is no link to click. Any suggestions? Link to comment
tuanphan Posted September 6, 2023 Share Posted September 6, 2023 On 9/4/2023 at 10:20 PM, indigoRising said: I'm trying to get this effect with an image that has a text block on top of it. The issue is that the text block blocks the cursor and the hover doesn't register on the image. I tried doing it so that the text block contains the link, and has a background enabled, then applying the css to the text block's background color/opacity. The problem here is that the link is only on the text, so when someone clicks any area of the image that isn't the text, the link doesn't register, even if if image itself is linked. Then I tried making the text block smaller so that the image link will be exposed around it, but then that creates a deadzone between the image and the text where there is no link to click. Any suggestions? Can you share link? We can try some code to make whole block 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!) Link to comment
Tessss Posted January 19 Share Posted January 19 On 9/6/2023 at 5:12 AM, tuanphan said: Can you share link? We can try some code to make whole block clickable Hi! I'm wondering if you could try this on my site, I'm struggling with the exact same issue that on hover my images change opacity but when you hover on the title the hover effect on the image dissapears and the text is unreadable. My url is www.tessadoet.com Link to comment
tuanphan Posted January 21 Share Posted January 21 On 1/19/2024 at 3:06 PM, Tessss said: Hi! I'm wondering if you could try this on my site, I'm struggling with the exact same issue that on hover my images change opacity but when you hover on the title the hover effect on the image dissapears and the text is unreadable. My url is www.tessadoet.com First, make text block cover whole image Next, add this word clickable with link to bottom of your Text Block Next, add this code to Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function(){ $('.fe-block a:contains("clickable")').addClass('text-click'); }); </script> <style> .text-click { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .text-click, .text-click * { color: transparent !important; } </style> 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
ArcherDougherty Posted March 26 Share Posted March 26 Hey guys, the above code wasn't working for me - I want gallery block images that are click through links to have some sort of hover effect and leave images that aren't links out of the equation. Any help? Site is still set to private: https://cobalt-mustard-hn3a.squarespace.com/config/ Link to comment
tuanphan Posted March 29 Share Posted March 29 On 3/27/2024 at 12:55 AM, ArcherDougherty said: Hey guys, the above code wasn't working for me - I want gallery block images that are click through links to have some sort of hover effect and leave images that aren't links out of the equation. Any help? Site is still set to private: https://cobalt-mustard-hn3a.squarespace.com/config/ Your site is private, you can follow this guide to share correct url 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment