Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

NFT preview card using HTML and CSS

airaciv•60
@airaciv
A solution to the NFT preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello, this is my first challenge from this website to practice my HTML and CSS. Feedback and comments are also welcome. One question that I have about this preview card is about the hover state of the card image. I would like to have the view-icon to have higher opacity like how it was shown in the design. I've tried several methods, even looking through other solution, but I'm still confused on how they do it unless I copy paste the whole thing. I've tried using another div to contain the view-icon and use lower opacity for those container, while using opacity 1 for the view-icon but it still doesn't work for me. Increasing the z-index of the view-icon, in this case, also doesn't work. Either it really doesn't work this way or I'm coding it wrong. If anyone could please kindly explain it to me, I will be very thankful!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Naveen Gumaste•10,420
    @NaveenGumaste
    Posted over 3 years ago

    Hello airaciv ! Congo 👏 on completing this challenge

    Let's look at some of your issues, shall we:

    • Add the font-weight to the "Eth" 0.41.

    happy Coding😀

    Marked as helpful
  • Abdul•8,560
    @Samadeen
    Posted over 3 years ago

    Hello! Cheers on Completing this challenge . You can use margin-top to push down your a little bit down.. Regardless you did very well . Happy Coding!!

  • imad•3,330
    @imadvv
    Posted over 3 years ago

    hey @airaciv , I take look at your code, and for the issue that you have is because you need to add hover to both ('.view-icon', and ' , '.equilibrium-img') classes from the card-image class, I well submit a pull request to your repository if you want me to help you.

  • airaciv•60
    @airaciv
    Posted over 3 years ago

    So after more browsing of the other solutions and do more research, I found that I can change the opacity of only the background-color of the view-icon by using RGBA value instead of HSL. I've fixed this part of my code. Other feedback and comment are always welcome!

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub