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

erlanggaadptrβ€’ 120

@erlanggaadptr

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Abdul Khalid πŸš€β€’ 72,160

@0xabdulkhalid

Posted

Hello there πŸ‘‹. Congratulations on successfully completing the challenge! πŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

COMPONENT MEASUREMENTS πŸ“:

  • Use min-height: 100vh for main instead of height: 100vh. Setting the height: 100vh may result in the component being cut off on smaller screens.
  • For example; if we set height: 100vh then the main will have 100vh height no matter what. Even if the content spans more than 100vh of viewport.
  • But if we set min-height: 100vh then the main will start at 100vh, if the content pushes the main beyond 100vh it will continue growing. However if you have content that takes less than 100vh it will still take 100vh in space.

.

I hope you find this helpful πŸ˜„ Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

1
nerometaβ€’ 250

@nerometa

Posted

Wow! Great job of you to make this looks very close to the design. A few recommendations, though:

  • The HTML of the price and time section. It looks kinda odd to me when you put an <img> tag inside <p> tag, which mainly uses for texts. I think you can improve upon it by grouping these elements together with <div>, then use <img> for icon and maybe <span> for text so it begins on the same line as your icon. Something like this:
<div>
<img src="ethereum.svg" alt="Ethereum">
<span>0.041 ETH</span>
</div>
  • This is the matter of taste, but I noticed that any links on the card (like the NFT name or the author's name), you tend to put an <a> tag over any text element to make it resembles a link. I kinda get it. Personally, I would put an <a> tag inside text element like:
<span>I would like to introduce you to this <a href="#">hyperlink</a>.</span>

That's my two cents. You're doing great!

Marked as helpful

1

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