Design comparison
Solution retrospective
Everything looks right. The only thing I couldn't figure out was getting the eye or view icon to show in the middle of the image when hovering over it. If anyone can help with this, let me know.
Community feedback
- @jakubinhooPosted almost 3 years ago
Hi, good job! The way I did this was setting position on icon to absolute, center on the image and set its opacity to 0. Then I just changed its opacity to 100% in hover selector. It's a little bit tricky, I created a whole new div do achieve this, but eventually it did work out. Hope it will help.
Marked as helpful1 - @alsirPosted almost 3 years ago
you can insert the image as element to the html and make it's opacity:0; and position it absolute and make it at the top of the first image then at a: hover and in it make the opacity higher . don't forget to keep the good work.
Marked as helpful1@peondgPosted almost 3 years ago@alsir Thank you! That worked. I ended up doing position: relative with a margin of 40%. This causes it to show centered and also seems to work.
1 - @sahibrightnowPosted almost 3 years ago
Hi, pretty good stuff. There's slight difference in the left and the right margin around the main image in your div.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord