halfhide Posted May 16 Share Posted May 16 Hi Squarespace I have a small problem. I'm trying to add a small text, that appears when hovering over the images, on my PROJECTS page. Just a small P2 text that says 'DISCOVER THIS PROJECT'. https://hexahedron-tuba-35nb.squarespace.com PW: ANNA Can you help? Thank you vey much in advance! Alastair Link to comment
tuanphan Posted May 18 Share Posted May 18 Same text for all items or different? https://hexahedron-tuba-35nb.squarespace.com/projects 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
halfhide Posted May 21 Author Share Posted May 21 Thanks. Yes, same text for all. Something like: "Discover the project here". Link to comment
tuanphan Posted May 22 Share Posted May 22 You can use this code to Website Tools > Custom CSS div.grid-image-inner-wrapper:before { content: "Discover projects"; font-size: 16px; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 99999999999999999 !important; opacity: 0; } .grid-item:hover div.grid-image-inner-wrapper:before { opacity: 1; } halfhide 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
halfhide Posted May 22 Author Share Posted May 22 Thanks! It works! Though it kind of hides behind the grey hover colour. It there a way to bring it to the front, so it is easier to read? Link to comment
tuanphan Posted May 23 Share Posted May 23 On 5/22/2024 at 3:36 PM, halfhide said: Thanks! It works! Though it kind of hides behind the grey hover colour. It there a way to bring it to the front, so it is easier to read? Because you used code to change opacity of whole image, so it will affect both image + text. You can use this CSS under to unset it. a.grid-item, .grid-image { opacity: 1 !important; } .grid-item:hover .grid-image-inner-wrapper:after { background: rgba(158,158,158,0.5) !important; opacity: 1 !important; } you can change rgba color to what you want halfhide 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
halfhide Posted May 23 Author Share Posted May 23 Amazing! Thank you so much for your help! Always great service! 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