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

HTML + CSS

@CamiloGav

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


Hello everyone! Thanks in advance for checking my code ... question: how could I have added a blue background to the eye image? I did not find the solution.

Greetings from Argentina

Community feedback

@Fernando0654

Posted

Right now, as you have your css, replace this to your .img-container::before. You can do this by inspecting elements first to see it works fine

   content: " ";
    position: absolute;
    opacity: 1;
    background-image: url(./images/icon-view.svg);
    background-position: center;
    background-size: 20%;
    height: 100%;
    width: 90%;
    background-repeat: no-repeat;
    background-color: blue;
    border-radius: 10px;

Of course, on background-color add the right color, I just wrote blue because I don't remember the color.

Good luck, though

Update: Don't forget to add space on content: " ", otherwise it won't work

Marked as helpful

1

@Joseph1032

Posted

Hi, Camilo. For the blue background, I would suggest taking a second look at the pseudo element ::before. Try using the background property instead of content for calling the eye image. It would look something like this:

content: " ";
position: absolute;
background: url(./images/icon-view.svg) cadetblue;
background-repeat: no-repeat;
background-position: center;
height: 100%;
width: 100%;
opacity: 0;

You might need to re-work your HTML to get everything right, but it's a start :)

Marked as helpful

0
Victor 290

@cervantesdeveloper

Posted

I added a div with (same dimensions that cube image) position relative that it contains the eye image, that div has a cyan background with .45 as value for the alpha channel. The opacity is 0 until the mouse is over the div.

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