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

Nft Card Component Solution

Anthony Rosman•510
@D3press3dd
A solution to the NFT preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This is my first challenge, the most difficult part for me was the hover in the image, i think i could improve a little bit more, but im still learning, im so proud that i could did it, happy codding guys♥,

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Renato Granados•160
    @Renato6GS
    Posted over 3 years ago

    Hi from Facebook!

    Very good job Rosman, I like the effect you put on the image.

    I get a small responsive error on screens larger than 20 inches, the card is not centered. And on screens larger than 1024px in height, the card looks too small.

    I can suggest you use "media querys" to adjust the card size and font size according to the user's screen.

  • Yu Dan•30
    @SelfReflective
    Posted over 3 years ago

    Great Work Anthony Rosman!

    I especially like the hovering on the main Image its REALLY smooth. Gotta learn how to do that ;)

    One thing that i would like to mention ( its very suddle) is the ETH Symbol, its slightly larger than the text nexto it. If you look closely on the Sample the Icon is exactly in the middle of the text nexto it.

    I did it by putting both elements in a div and then adding flexbox. after that align the items in the center - that should do it. But im sure there are many different way to do it :D

    Cya Yu

  • MikevPeeren•2,100
    @MikevPeeren
    Posted over 3 years ago

    Hey 👋

    Good job finishing this one 👏

    My only comment would be to add more descriptive text for the nft as a screenreader would like to know what they are buying.

  • P
    Jairo Valderrama•420
    @jairovg
    Posted over 3 years ago

    Hi @D3press3dd, here are some comments:

    • You're adding a fixed width to the card element. Instead of doing that, I would suggest you use a max-width on this element, adding some left and right margins on mobile versions and an auto margin on greater devices.
    • Use more semantic elements, like the card-title element, this should be an h1. See more here.
    • I've seen you're using the base font size as 62.5%. I don't know if you did it intentional in order to get a base size of 10px so the font-size gets equivalent values like 1.2rem as 12px. You may have unexpected behaviors if a browser does not have a default font-size as 16px. I suggest you use the base font-size as the one in the style-guide and then calculate the rems for the rest.
    • As @Renato6GS mentioned, there is an issue with large devices, is not a browser related issue. The problem is that you placed a fixed size on the body as 144rem so the card is getting centered inside this fixed width.
    • Consider taking a look on your a11y report.

    PD: Nice transitions on page elements, btw.

  • Anthony Rosman•510
    @D3press3dd
    Posted over 3 years ago

    The tricky part in the hover is the duration of the transitions, thats all,without realizing i damaged the design😥😥, thanks for the observation💞💞 I will accommodate it, I still applied flexbox but maybe changing some things I forgot to fixed again.

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

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