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

NFT preview card component solution

NotYoel 130

@NotYoel

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


Any feedback on better code quality (or practices) would be appreciated, be as critical as you can, it'll help a lot.

Community feedback

Boots 😺 1,590

@adityaphasu

Posted

Hello, @NotYoel!

One quick suggestion to remove uneccesarry code:

  • You can remove height: 500px; from the .main-container as the content inside the container is large enough, it will cause the container to expand to accommodate the content's natural height.

Some more in general suggestions:

  • Instead of using px for font size which is an absolute unit try using rem which is a relative unit and scales well with layouts. (In your case font-size:19px would turn roughly into font-size: 1.1875rem). Give this a read if you want to learn more about it.
  • Instead of using div for .main-container to represent the whole content on the page try using a more semantic tag like <main> which tells the search engines and assistive technologies that the content inside it is the main content of the page.

Apart from these 3 things, the solution is spot on! Nice flexbox work!

Keep up the hard work and happy coding!🥂

Marked as helpful

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