Daniel_Joseph Posted October 3, 2022 Share Posted October 3, 2022 Site URL: https://www.danieljoseph.com.au/films Hey there, I am having trouble with adding a simple hover effect to my image blocks in the new Fluid Engine. Essentially I am trying to recreate this: http://www.ladybaguette.com/ Currently I have managed to Frankenstein some code which isolates each block individually and achieves the slight fade to black instead of the white background. Although for some reason I can't figure out why my ease transition CSS isn't working. My Code: #block-b1dfc7170d9088ca974b:hover .content-fill:after { content: ""; position: absolute; background-color: rgba(0,0,0,0.5); top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; opacity: 0; transition: all .3s; } #block-b1dfc7170d9088ca974b:hover .content-fill:after { opacity: .3; transition: all .3s; } ^^ This is then replicated with the new block ID for the other images Another problem is that the fade animation will not happen when the cursor is over the text block which is on-top of the image. Any help in order to fix this would be much appreciated!! ilseS 1 Link to comment
Beyondspace Posted October 3, 2022 Share Posted October 3, 2022 29 minutes ago, Daniel_Joseph said: Site URL: https://www.danieljoseph.com.au/films Hey there, I am having trouble with adding a simple hover effect to my image blocks in the new Fluid Engine. Essentially I am trying to recreate this: http://www.ladybaguette.com/ Currently I have managed to Frankenstein some code which isolates each block individually and achieves the slight fade to black instead of the white background. Although for some reason I can't figure out why my ease transition CSS isn't working. My Code: #block-b1dfc7170d9088ca974b:hover .content-fill:after { content: ""; position: absolute; background-color: rgba(0,0,0,0.5); top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; opacity: 0; transition: all .3s; } #block-b1dfc7170d9088ca974b:hover .content-fill:after { opacity: .3; transition: all .3s; } ^^ This is then replicated with the new block ID for the other images Another problem is that the fade animation will not happen when the cursor is over the text block which is on-top of the image. Any help in order to fix this would be much appreciated!! I try the following code and it seems work properly #block-b1dfc7170d9088ca974b .content-fill:after { content:''; opacity: 0; position: absolute; background-color: rgba(0,0,0,.5); top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; transition: all 1s; } #block-b1dfc7170d9088ca974b:hover .content-fill:after { opacity: .3; transition: all 1s; } Support me by pressing 👍 if this useful for you Daniel_Joseph 1 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
Daniel_Joseph Posted October 4, 2022 Author Share Posted October 4, 2022 Thank you so much! This is working. It's a small thing, but is there anyway to maintain the hover effect when the cursor is over the text block? Just something I'm noticing that is happening on mine and not the referenced page. And on an unrelated note, at the bottom of the page where the section meets the footer, there is this odd white gap. Is there any reason as to why the image and the footer isn't lining up perfectly? (see attached) Link to comment
tuanphan Posted October 6, 2022 Share Posted October 6, 2022 On 10/4/2022 at 7:46 AM, Daniel_Joseph said: Thank you so much! This is working. It's a small thing, but is there anyway to maintain the hover effect when the cursor is over the text block? Just something I'm noticing that is happening on mine and not the referenced page. And on an unrelated note, at the bottom of the page where the section meets the footer, there is this odd white gap. Is there any reason as to why the image and the footer isn't lining up perfectly? (see attached) #1. Add this code under .fe-63248c8d498621168046cfc9:hover #block-b1dfc7170d9088ca974b:hover .content-fill:after { opacity: .3; transition: all 1s; } #2. It is a bug.. 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
Daniel_Joseph Posted October 7, 2022 Author Share Posted October 7, 2022 17 hours ago, tuanphan said: #1. Add this code under .fe-63248c8d498621168046cfc9:hover #block-b1dfc7170d9088ca974b:hover .content-fill:after { opacity: .3; transition: all 1s; } #2. It is a bug.. #1. This doesn't seem to be working for me? I understand that this line of code should only be working for that block ID but it doesn't darken over the text still. Am I doing something wrong (attached) #2. Shame about the bug... it's annoying. Link to comment
tuanphan Posted October 8, 2022 Share Posted October 8, 2022 On 10/7/2022 at 9:46 AM, Daniel_Joseph said: #1. This doesn't seem to be working for me? I understand that this line of code should only be working for that block ID but it doesn't darken over the text still. Am I doing something wrong (attached) #2. Shame about the bug... it's annoying. Try this new code .fe-63248c8d498621168046cfc9:hover #block-b1dfc7170d9088ca974b:hover .content-fill:after { opacity: .3; transition: all 1s; background-color: rgba(0,0,0,.5) !important; } .fe-63248c8d498621168046cfc9:hover * { cursor: pointer; } 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
Daniel_Joseph Posted October 13, 2022 Author Share Posted October 13, 2022 On 10/8/2022 at 7:33 PM, tuanphan said: .fe-63248c8d498621168046cfc9:hover #block-b1dfc7170d9088ca974b:hover .content-fill:after { opacity: .3; transition: all 1s; background-color: rgba(0,0,0,.5) !important; } .fe-63248c8d498621168046cfc9:hover * { cursor: pointer; } Still doesn't work for me 😕 Link to comment
tuanphan Posted October 16, 2022 Share Posted October 16, 2022 On 10/13/2022 at 6:50 PM, Daniel_Joseph said: Still doesn't work for me 😕 I tested & it should work. Can you send all code in CSS box after adding that code? 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
Daniel_Joseph Posted October 23, 2022 Author Share Posted October 23, 2022 I have attached all the custom CSS code for that block with the additional code added from line 94-101 This dosn't work when mousing over the text on my end. Is there something I'm doing wrong? Link to comment
Vulpes Posted February 29 Share Posted February 29 @tuanphan Apologies for the thread revive and mention. I've been using this code to attempt the same thing on my site and also cannot get this to work. Any chance of a quick update when you get a moment? I've made some assumptions based on the above code by using the text block ID in the second stanza, clearly this isn't correct as only the image darkens and goes light again when the cursor hits the text. www.orientafricatravel.com/home #block-yui_3_17_2_1_1679478884804_65665:hover .content-fill:after { opacity: .5; transition: all 1s; background-color: rgba(0,0,0,1) !important; } #block-yui_3_17_2_1_1679478884804_73424:hover * { cursor: pointer; } #block-98e23ec37ec355c43e43:hover .content-fill:after { opacity: .5; transition: all 1s; background-color: rgba(0,0,0,1) !important; } #block-bdfaf28773dfaa3a5558:hover * { cursor: pointer; } #block-0da1641ca41af1469866:hover .content-fill:after { opacity: .5; transition: all 1s; background-color: rgba(0,0,0,1) !important; } #block-f53ee2822f6dbaa9b915:hover * { cursor: pointer; } Link to comment
tuanphan Posted March 3 Share Posted March 3 On 3/1/2024 at 3:38 AM, Vulpes said: @tuanphan Apologies for the thread revive and mention. I've been using this code to attempt the same thing on my site and also cannot get this to work. Any chance of a quick update when you get a moment? I've made some assumptions based on the above code by using the text block ID in the second stanza, clearly this isn't correct as only the image darkens and goes light again when the cursor hits the text. www.orientafricatravel.com/home #block-yui_3_17_2_1_1679478884804_65665:hover .content-fill:after { opacity: .5; transition: all 1s; background-color: rgba(0,0,0,1) !important; } #block-yui_3_17_2_1_1679478884804_73424:hover * { cursor: pointer; } #block-98e23ec37ec355c43e43:hover .content-fill:after { opacity: .5; transition: all 1s; background-color: rgba(0,0,0,1) !important; } #block-bdfaf28773dfaa3a5558:hover * { cursor: pointer; } #block-0da1641ca41af1469866:hover .content-fill:after { opacity: .5; transition: all 1s; background-color: rgba(0,0,0,1) !important; } #block-f53ee2822f6dbaa9b915:hover * { cursor: pointer; } For these image blocks? with first image, use this CSS code #block-yui_3_17_2_1_1679478884804_65665 .content-fill:after { transition: all 1s; background-color: rgba(0,0,0,5) !important; content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; opacity: 0; } #block-yui_3_17_2_1_1679478884804_65665:hover .content-fill:after { opacity: 1 !important; } With other images, you can do similar Vulpes 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
Vulpes Posted March 4 Share Posted March 4 Thanks @tuanphan Yes, you got it, those blocks. Thanks for the code, this works the same as before but I still have the same issues with hovering over the text which ignores the image opacity. Is this the bug you mentioned above or something we can fix with CSS? Thank you again for your time. Link to comment
tuanphan Posted March 5 Share Posted March 5 23 hours ago, Vulpes said: Thanks @tuanphan Yes, you got it, those blocks. Thanks for the code, this works the same as before but I still have the same issues with hovering over the text which ignores the image opacity. Is this the bug you mentioned above or something we can fix with CSS? Thank you again for your time. I see it already worked here, you try checking it again 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
Vulpes Posted March 5 Share Posted March 5 3 hours ago, tuanphan said: I see it already worked here, you try checking it again Thanks, it could be my browser but on Chrome, when I hover over the text with the cursor the image returns to being visible. 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