camhick706 Posted November 15 Share Posted November 15 I have added this code into the css for zoom image on hover and it has worked on a previous site but not this one. Am I missing something? .gallery-grid-item:hover img { transform: scale(1.2); transition: all 0.5s ease; overflow:hidden!important; } .gallery-grid-item{ overflow:hidden!important; } Link to comment
SaranyaDesigns Posted November 15 Share Posted November 15 @camhick706 is the image in question inside a gallery or standalone? The code you've supplied looks like it's only good for a gallery. If you provide a link to the page you need help with, we can help you adjust accordingly... Link to comment
camhick706 Posted November 16 Author Share Posted November 16 It is inside a gallery- https://www.cameronhickeydesign.com/graphic-design Link to comment
SaranyaDesigns Posted November 16 Share Posted November 16 @camhick706 it looks like maybe at some point you switched the gallery layout from grid to masonry? That'll be why your code isn't working anymore, it was only targeting grid layout. Try replacing "grid" with "masonry" in your code. You also don't need the overflow property in the img selector, and I think the transition property belongs on the primary element before the hover action, so like this: .gallery-masonry-item img { transition: all 0.5s ease; } .gallery-masonry-item:hover img { transform: scale(1.2); } .gallery-masonry-item { overflow: hidden !important; } let me know? Link to comment
camhick706 Posted November 16 Author Share Posted November 16 Ahh didn't even notice that. Working now thanks! SaranyaDesigns 1 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