noahvdg Posted January 12, 2023 Share Posted January 12, 2023 Hey guys - I'm using the below text to try and reveal a text block placed behind an image to appear on hover. The code is working on my personal website, but when I try it on my clients website it only works when you are in edit mode. Anyone got any ideas? Thank you @media only screen and (min-width: 640px){ #block-yui_3_17_2_1_1673492412284_3335 { opacity: 0; transition: opacity 1s } #block-yui_3_17_2_1_1673492412284_3335:hover { opacity: 1; transition: opacity 1s } } Link to comment
tuanphan Posted January 15, 2023 Share Posted January 15, 2023 Hi, What is your site url? We can check easier 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
noahvdg Posted January 28, 2023 Author Share Posted January 28, 2023 https://mandolin-spinach-fnj6.squarespace.com/ On the home page for the Embark image pword: 1234 Thanks in advance Link to comment
noahvdg Posted January 28, 2023 Author Share Posted January 28, 2023 I have found that it works when I have no background colour on the text box, but doesn't when I have the colour tuanphan 1 Link to comment
tuanphan Posted February 1, 2023 Share Posted February 1, 2023 I see you figured it out? 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
noahvdg Posted February 2, 2023 Author Share Posted February 2, 2023 Yes I did by complete luck! had to put the usual code twice for each box - one with "min-width" and then one with "max width" - any idea why this worked? //Reveal Text - Embark// @media only screen and (min-width: 640px){ #block-yui_3_17_2_1_1675062158984_28173 { opacity: 0 !important; transition: opacity 1s !important } #block-yui_3_17_2_1_1675062158984_28173:hover { opacity: 0.8 !important; transition: opacity 1s !important } } @media only screen and (max-width: 640px){ #block-yui_3_17_2_1_1675062158984_28173 { opacity: 0 !important; transition: opacity 1s !important } #block-yui_3_17_2_1_1675062158984_28173:hover { opacity: 0.8 !important; transition: opacity 1s !important } } tuanphan and ec25 2 Link to comment
PCC68 Posted March 19, 2023 Share Posted March 19, 2023 I've been losing my mind trying to figure out what I was doing wrong. I got a piece of code from someone on "Inside the Square and I couldn't get it to work no matter what I tried. This solved it though. Unfortunately, now I have to go back and fix every image in my portfolio! 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