NFT component using CSS and HTML

Solution retrospective
Hi everyone, I had a hard time figuring out what was the best way to show the background and the view icon at the moment we hover it, I used position relative and absolute, I contained the NFT photo and the other container that has the background separately and then on the background contained I used another container to apply the attribute "position: relative" and then I created other 2 containers in order to allocate the view icon in one layer and the background in another one, I used z-index in order to place the background in 0 and the view icon in 1, it works...
Can you suggest a better way I can do it? Also, I used fixed units in order to use the "position: relative" in the main image container, is there a better way to do it?
Thank you so much if you took the time to read my doubt and even more if you can suggest me something <3
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Bryan Portillo's solution.
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