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

I put a subtle transitions on hover

@CGM-ThanHtike

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


Thanks for checking this out

I put a transitions on hover, but I'm not sure this is the right approach.

"If you have any suggestions or feedback for my code, please feel free to comment." I would greatly appreciate all feedback.

Community feedback

Arne 1,110

@Dudeldups

Posted

Heya! This looks good! Two things I saw:

  • For the hover state of the image, you can use the ::after pseudo element with

background: #color url(eye-image) center no-repeat;

And then use opacity transition to show or hide it on hover. This way, the "eye" icon also transitions :)

  • You used way too many flex containers. For the div where the price and remaining days are shown, you can put all of that in a div, give it a gap and use margin-right: auto on the price. This way, it pushes the other elements all the way to the right :)

Marked as helpful

0

@CGM-ThanHtike

Posted

Thank you for the feedback @Dudeldups. I just fixed with opacity and it looks way better. And for the margin-right: auto method, I was try that before but the problem is, I was struggling with aligning icons and text vertically (that's why I used flex also for it).

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