Design comparison
Solution retrospective
I couldn't figure it out how to make view-icon to stay white on hover. Any help would be appreciated.
Community feedback
- @IamparvesPosted almost 3 years ago
That's happening because you are using opacity to control the cyan background. Since the icon is the child of overlay div it's also becoming transparent with the background. Instead you should use hsla/rgba color for the overlay background and opacity for the icon.
I did the overlay using pseudo element. You can try that method as well. My Soluton
Marked as helpful1 - @Ls6375Posted almost 3 years ago
use display block on the image it will fix the extra overlay issue
0@TomasScerbakPosted almost 3 years ago@Ls6375 it didn't help...i think my whole aproach is wrong, but thanks.
0@Ls6375Posted almost 3 years ago@TomasScerbak I tried Doing it !!! and it work U need to insert display block in img tag in class="equilibrium" .equilibrium{ display: block } this will definatily work!!!!
Marked as helpful0@TomasScerbakPosted almost 3 years ago@Ls6375 you're right just did the change, I saw this in tutorial yesterday as well so now I will know. Thank you very much
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