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

nft preview card componen main

@DavidMartelCloutier

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


if anyone can tell me how to display the icon view on hover without removing the image behind it would be appreciated. I tried several techniques but I couldn't find it.

Community feedback

Nneoma Njoku 1,210

@SatellitePeace

Posted

Hello @DavidMartelCloutier your NFT card looks great

  • now to answer your question

  • There is a CSS property called z-index.

  • z-index determines the overlapping contents that will appear first without affecting the position or visibility of other contents

  • If you have not tried the z-index you should try it

set the z-index of the icon to 3 then set the z-index of the image to either -1 or 1

like so

main__img:hover{
z-index: -1;
}

.icon__img:hover{
z-index:3;
}
````

I hope this helps

Marked as helpful

0

@Raja-Junaid

Posted

@DavidMartelCloutier Hi David. Congratulation on completing this challenge.

There is another way to add an eye image in your hover. So you can also add background-image: url(); and then add URL of an eye image.

.img:hover{ backgroun-image: url(); }

and then add url.

I hope this helps you

Marked as helpful

1

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