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

NFT preview card component

Mateus Moura Domingos•170
@Theuz1nh0
A solution to the NFT preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


  • What did you think of my solution?
  • Do I need to improve anything?
  • I would really like your feedback.

-I'm not using preprocessors yet, but I plan on doing so soon.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

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

    👾 Fala Mateus Moura, beleza?

    De novo outra análise do seu código, essa solução tá certinha, inclusive responsiva. As únicas coisas que faltam ajustar é a sombra que tá muito forte e o efeito hover que está sem solução e não tá tão suave.

    Adicionar transição:

       .link-image:hover::after {
         transition: all ease 0.3s
        }
    
       .link-image:after {
         transition: all ease 0.3s
        }
    
    h1 a:hover, section a:hover {
        color: hsl(178, 100%, 50%);
        transition: 500ms;
    }
    

    O valor correto para a sombra:

    box-shadow: 5px 5px 15px 5px rgb(0 0 0 / 14%);

    Usa esse site aqui pra criar as box-shadow e só jogar código no css: https://www.cssmatic.com/box-shadow

    Espero ter ajudado, pra cima ein!

    Marked as helpful
  • Pradeep Saini•990
    @pradeeps4ini
    Posted about 3 years ago

    Hey, Mateus. How are you, dude?

    Congrats on completing the project.

    I would like to give some suggestions.

    1. Learn about CSS custom properties (variables). They help in make the code reusable and modifiable without changing the same value repeatedly.

    2. You are using "display: flex;" on multiple elements. You can create an utility class, ".flex {display:flex;}". And use it on the elements where you want to use flexbox. This way you won't have to write same property multiple times.

    3. You don't need to provide alt text for decorative images. For example clock and icon-ethereum image. Give a descriptive alt for images that convey some meaning. Clock and icon-ethereum don't convey any meaning here. They are for decorative purpose only.

    4. Try to limit use of id's in CSS. They have high specificity and can cause cascade and specificity issues. Try to use classes and element selectors.

    Marked as helpful
  • Juan Hamilton•470
    @hamilton-i7
    Posted about 3 years ago

    Hi there, Mateus!👋

    You did a very good job on this challenge👏 Great use of flexbox to center the card throughout different screen sizes👍

    There's just a couple of things I'd suggest:

    1. Try to use relative units such as rem or em whenever possible. For instance, you may also use it on padding and margin. That way, you ensure your website will scale properly if the root font size changes
    2. You could use a combination of max-width and width instead of just width to make sure the card is able to scale down better on the really small screen sizes, like below:
    main {
      max-width: 21.875rem;
      width: 100%;
    }
    

    Hope you find this helpful! Happy coding😎

    Marked as helpful
  • faizan•2,420
    @afaiz-space
    Posted about 3 years ago

    Hey @Theuz1nh0,

    <div id="informations">
        <div>    >--- **add div element**
          <img src="./images/icon-ethereum.svg" alt="icon ethereum"><span id="icon-ethereum"> 0.041 ETH</span>
        </div>
        
         <div>      >------ **add div element**       
          <img src="./images/icon-clock.svg" alt="icon clock"><span id="icon-clock"> 3 days left</span>
        </div>
    </div>
    
    
    • after add div element then add justify-content: space-between; in #informations id.
    • remove margin-right: 37%; from icon-ethereum id.
    Marked as helpful

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