Design comparison
Solution retrospective
A noob here. Learned overlay image on hover this time. Wonder if I did that correctly? I saw something about transition timing function, but I don't know if that's necessary here. Feedback is most welcomed! Thank you!
Community feedback
- @pradeeps4iniPosted over 2 years ago
Hi, Charmonder. You've done a great job implementing the design.
I would like to give few suggestions, if you don't mind.
-
When i resize the window below 280px, the image goes out of focus. This happens because the image has a fixed width. You can set the "max-width:100%" on the image. With this the image will auto-adjust to the width of the container. You can also use "padding-inline: 10px;", to give space on the sides.
-
You have done a good job on setting the overlay image. You can also use pseudo elements to set the overlay image. I have written this code to explain what i mean. Please have a look, modify it and learn from it. To set the eye icon, you can use background-image.
https://codepen.io/pradeeps4ini/pen/yLKbRqB?editors=0100
- You are using fixed units everywhere. Learn about rems/ems and use them. They are relative units and make working with sizes little easier. https://www.youtube.com/watch?v=N5wpD9Ov_To
Marked as helpful1@charmonderPosted over 2 years ago@pradeeps4ini Thank you so much, Pradeep! Your suggestions are very helpful. Thank you for taking the time to teach me :)
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