NGO2045 Posted October 8, 2021 Share Posted October 8, 2021 Hi! I used a code for hover zoom on my gallery masonry. It works, but one of the other images (not in the gallery masonry) also gets a hover effect and I want to disable it. Thanks in advance! The ID for the image that I would want to disable: #block-yui_3_17_2_1_1632753956520_10855 The code I used for zoom hover in the gallery masonry: /* Homepage gallery grid image zoom on hover */ body.homepage figure:hover img { transform: scale(1.1); transition: all 0.5s; } body.homepage figure img { transition: all 0.5s; } Link to comment
NGO2045 Posted October 8, 2021 Author Share Posted October 8, 2021 Solved it by doing this: #block-yui_3_17_2_1_1632753956520_10855:hover img { transform: scale(1); transition: all 0.5s; } body.homepage figure img { transition: all 0.5s; } But I suspect there may be a better way. If you know how, you are welcome to explain to a beginner like me 🙂 Link to comment
NGO2045 Posted October 8, 2021 Author Share Posted October 8, 2021 #block-yui_3_17_2_1_1632753956520_10855:hover img { transform: none; } I'm thinking right here? 🙂 Link to comment
tuanphan Posted October 10, 2021 Share Posted October 10, 2021 Do you still need help on this? 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
NGO2045 Posted October 10, 2021 Author Share Posted October 10, 2021 Solved it! Thanks anyway! 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