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 styled using CSS

@Jovaughn229

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


I am having difficulties lining up the view icon over the equilibrium icon for when a hover action takes place. How do I stack these images on top of each other? I have commented out what I have so far, would appreciate some feedback.

Community feedback

imad 3,330

@imadvv

Posted

Hi Jovaughn Bennett, there are many ways to archive like this effect, one of them is to use opacity:0 in both the icon and bg overlay and than change that to opacity:1 in hover .

I actually took some time to look at your code, and I take some note heplfully you find some of them useul.

you can set this values hoverimg {opacity : 0}, .equimg{cursor: pointer;} , .equilibrium{width: 100%} , .icon{opacity:0} and than

.hoverimg:hover {
  opacity: 0.8;
}
.hoverimg:hover .icon {
  opacity: 1;
}

also check for spell for some classes, Hope this help and happy coding!

Marked as helpful

1

@dannygomes

Posted

Hey! I also struggled with the hover image effect. I used a pseudo element to get it done, so I use the hover selector and then use the :after selector on that very same selector to create the pseudo element as the image is hovered. Then it's just a matter of setting the position absolute on the pseudo element and on the parent (I hope I explained myself correctly).

The more experienced developers helped me out with this on the Slack community in the #help channel, if you need help you should join, I really recommend it!

0

@DAST-87

Posted

Eu utilizei POSITION - ABSOLUTE nas imagens. Depois é só organizar quem fica por cima ou por baixo com Z-INDEX.

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