Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Simple solution using Flex and Grid

Nikolas Papenfusβ€’ 380

@NPM0486

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Are the class names appropriate? Did I give too many div tags? I had a problem with the hover on the photo, I currently made a div that is above the photo, but in the plans I had to use :after but it didn't work so I went to plan B.

Community feedback

P
Dave Quahβ€’ 670

@Milleus

Posted

Hi Nikolas, congrats on completing the challenge πŸ₯³

There seem to be an issue where when the mouse is at the center of the picture (where the invisible "eye" is), the overlay and eye disappears. I believe this is because in CSS the effect triggers on .overlay:hover, but when the mouse is in the center it is hovering over the invisible <img class="view"> instead of the <div class="overlay">.

One way to fix it is to set pointer-events: none to the <img class="view">, https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events.

Another way to fix this is to remove <img class="view"> and add it as a background-image to the overlay instead.

I hope you wouldn't mind if I share my solution with you. It uses background-image as well as :after - https://www.frontendmentor.io/solutions/nft-preview-card-component-rJRIRaSVc

Hope this helps and happy coding!

Marked as helpful

0

Nikolas Papenfusβ€’ 380

@NPM0486

Posted

@Milleus Thanks a lot! I didn't even notice the error. I have corrected my mistake. :D

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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