Design comparison
Solution retrospective
Will be grateful to receive a feedback. Especially about cursor hover main image effect, when picture kinda fades out a bit and "view" image also appears on the center.
A have achieved needed result but I'm pretty sure there is more sophisticated way to do that.
Community feedback
- @dondelice257Posted over 1 year ago
Okay but it's not a hard-code at all, but you can try using {display:flex; justify-content:center} on the container and {margin: auto} on the element inside a container, this also centers an element inside a container
Marked as helpful1 - @dondelice257Posted over 1 year ago
Perfect work, you can improve by making a shaddow on the section so that the users can see easly the limit of this section, also in frontend everything has signification ( what does the eye icon do ? i clicked it but nothing changed )
0@mark-pherzPosted over 1 year ago@dondelice257
Thank you for feedback. The icon does nothing, the idea is when mouse hovers the main image, it goes half cyan color with white eye icon right on the center. And I had hard times figuring out how to accomplish that, the approach with overlap layer seems reasonable to me, but positioning the icon right in the center was a problem to me, and eventually I had to check what people on do in this case, and the final solution was using absolute positioning and top: 50%; left: 50%; transform: translate(-50%, -50%);
And I'm kinda sure that there is a way to center it in more clean fashion without using transform. But I can't figure it out now.
1
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