Red_Dot_Design Posted May 24, 2023 Posted May 24, 2023 How can I edit my code so that in the attached screenshot: The colour overlay (on hover) covers the image perfectly The overlay text sits middle centre Many thanks Tara
Ziggy Posted May 24, 2023 Posted May 24, 2023 Can you share your website URL and generally expand on details including the code you've used? Thanks! 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted May 24, 2023 Author Posted May 24, 2023 This is the code I've used to get it to what you see in the screenshot: .sqs-block.image-block { padding: 0; margin: 10px; } .sqs-block-image .image-block-outer-wrapper:not(.image-block-v2).layout-caption-overlay-hover .image-caption-wrapper { background: #515b64; opacity: 80%; width: 100%; height: 100%; } Website link here: https://elk-tuna-ztlx.squarespace.com/ Password: hello
Ziggy Posted May 24, 2023 Posted May 24, 2023 Add this to your CSS: .sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover:hover .image-caption-wrapper { max-height: 100%; } Red_Dot_Design 1 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted May 24, 2023 Author Posted May 24, 2023 So that has kind of worked but now its sitting above and below the image by too much (see attached screenshot). Is there a fix for this?
Ziggy Posted May 24, 2023 Posted May 24, 2023 Not sure why that's happened, but when looking at your website I can only see the default small caption overlay now, did you remove the CSS? Red_Dot_Design 1 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted May 24, 2023 Author Posted May 24, 2023 I didn't remove it no - it just suddenly stopped working.
Ziggy Posted May 24, 2023 Posted May 24, 2023 2 hours ago, Red_Dot_Design said: I didn't remove it no - it just suddenly stopped working. Did you do anything beyond adding the CSS I gave you? Red_Dot_Design 1 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted May 25, 2023 Author Posted May 25, 2023 I've removed everything and re-added the code and it's working again! The only question left is how do I center the overlay text within the box and style it? Thank you. Ziggy 1
Ziggy Posted May 25, 2023 Posted May 25, 2023 Try adding this too: .sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover:hover .image-caption { margin-top: auto; margin-bottom: auto; } .sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover:hover .image-caption-wrapper { display: flex; align-content: center; } Red_Dot_Design 1 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted May 25, 2023 Author Posted May 25, 2023 Thank you, that's much closer but it's still sitting to the left (see screenshot) is there a way to centre it completely?
Solution Ziggy Posted May 25, 2023 Solution Posted May 25, 2023 3 hours ago, Red_Dot_Design said: Thank you, that's much closer but it's still sitting to the left (see screenshot) is there a way to centre it completely? Yes, replace the previous with this: .sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover:hover .image-caption { margin: auto; } .sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover:hover .image-caption-wrapper { display: flex; align-content: center; } Red_Dot_Design and tuanphan 2 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted July 7, 2023 Author Posted July 7, 2023 Hi Ziggy, I've moved this onto a new site and I am having a few problems. Firstly, I've added the exact code in the solution above but what happens is as per the attached screenshot titled "Overlay example". Would you be able to have a look and let me know how to adjust the code so the overlay colour covers the photo completely and the text is completely centre aligned? My new site is at: https://gopher-tomato-twpa.squarespace.com/ Password: hello Thanks, Tara
Ziggy Posted July 7, 2023 Posted July 7, 2023 Hi Tara, it looks like you need an !important after the 80% opacity and add this: .image-caption-wrapper { max-height: 100% !important; } Red_Dot_Design 1 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted July 7, 2023 Author Posted July 7, 2023 Thank you! 😊 That helped fixed the colour overlay but the text is still sitting at the bottom instead of in the middle of the box? Ziggy 1
Ziggy Posted July 7, 2023 Posted July 7, 2023 Add this too: .sqs-block-image .image-block-outer-wrapper:not(.image-block-v2).layout-caption-overlay-hover:hover .image-caption-wrapper .image-caption { margin-bottom:auto !important; } Red_Dot_Design 1 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted July 7, 2023 Author Posted July 7, 2023 Thanks! That's it all fixed aesthetically but now when I try to click on each box it no longer takes me to the linked page. If I remove the code the links seem to work fine.
Ziggy Posted July 7, 2023 Posted July 7, 2023 Yes, it looks like the image is the only clickable element, the caption is not clickable, so when you cover the entire image, there's nothing left to click on! How frustrating! 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Red_Dot_Design Posted July 7, 2023 Author Posted July 7, 2023 Ok, thanks for all your help anyway. If you can think of another way of setting it up where the link would still work, let me know.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment