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

NFT preview card using CSS

accessibility, sass/scss
Cristina Kelly•140
@cristinakellyt
A solution to the NFT preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hi, all! I thought this one would be easy, but it took a while to find a good and proper way to put the hover effect on the image. Anyway, it was a good challenge! All feedback and improvements are welcome =)

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • James•340
    @James-alderson
    Posted almost 3 years ago

    Hi Cristina Kelly, I saw your design, it was very well designed, but there are a few small issues that you can fix to help make your design better.

    as follows:

    • Create a folder called 'assets' and put all the files related to the challenge inside it.
    • Define your web fonts inside css, by doing this you have helped the HTML code to be seen better, and in addition, the challenge you have designed will load faster because the fonts will be loaded after the design is fully loaded، and until then it uses the system font for display.
    • It is better to use the 'a' tag for texts that can be hovered.
    • Use the 'table of content' above your css code, this will help your css codes to be better seen and clean.
    • Challenge design for mobile resolution.
    • Adding design screenshots to challenge files.
    • Do not ignore the 'README' file, because it displays information about your design.
    • ...

    By the way, I have created a fork in your repository, you can add all the changes to your project this way.

    These are some of the tips that help to improve your design, you can see all the changes in the commits section.

    Don't forget to practice, because the more you practice, the better and faster you will design.

    Happy coding :)

    Marked as helpful
  • Lucas 👾•104,160
    @correlucas
    Posted almost 3 years ago

    👾Hello Cristina K., congratulations for your new solution!

    Your solution is just great, you've a really good work wrapping everything and using semantic tags, nice also the you've used rem values.

    Here's my tips for you:

    Here's how to fix the responsivity for the card:

    .card {
        max-width: 35rem;
    }
    

    This is the correct value for the box-shadow

    .card {
        box-shadow: 5px 5px 15px 5px rgb(0 0 0 / 3%);
        /* box-shadow: -1.5rem 2rem 0 hsl(217deg 52% 10%), 1.5rem 2rem 0 hsl(217deg 52% 10%); */
    }
    

    Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/nft-preview-card-vanilla-css-custom-design-and-hover-effects-b8D1k9PDmX

    👋 I hope this helps you and happy coding!

    Marked as helpful
  • Dan•300
    @dtp27
    Posted almost 3 years ago

    Hi Christina!

    That looks fantastic! I noticed that you're using the BEM naming convention. It was recommended to me that I start using it as well. How have you liked using it and how does it compare with anything you've used in the past?

    Thanks!

    Dan

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
Frontend Mentor logo

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