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
Request path contains unescaped characters
Not Found
Not Found
Not Found

Submitted

nft-card-challange

@BerkePalamutcu

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


I am open for feedback :) So that I can fix my spaghetti code one day :)

Community feedback

Travolgi 🍕 31,400

@denielden

Posted

Hi Navarcus, great work on this challenge! 😉

Here are a few tips for improve your code:

  • remove all margin from .container class
  • use flexbox to the body to center the card
  • after, add min-height: 100vh to body because Flexbox aligns child items to the size of the parent container
  • instead of using px use relative units of measurement like rem -> read here

Overall you did well 😁 Hope this help!

Marked as helpful

1
PhoenixDev22 16,950

@PhoenixDev22

Posted

Hello @navarcus ,

Congratulation on completing this frontend mentor challenge.

I have some suggestions regarding your solution:

The link wrapping the equilibrium image should either have Sr-only text, an aria-label or alt text that says where that link takes you.

  • To use more semantic tags , you can use <ul> to wrap class="maincontent"and in each <li> there would be<img>and <p>(not a header)

You can use <figure> and <figcaption > for the avatar's part.

To center the card on the page, you may use flex or grid properties to the body and min-height: 100vh . Then you can rremove the margins.

  • width: 340px; an explicit width is not a good way . consider using max-width to card instead and a little margin to the card .That will let it shrink a little when it needs to.

General points :

  • It's recommended to use em and rem units .Both em and rem are flexible, Using px won't allow the user to control the font size based on their needs.

  • It's not recommended to use px for font size.If the user tries to resize the text through his browser, any element with an absolute font size will not change, although any other element will. This prevents users from making your page's text larger if they need to see it more clearly, or smaller if they think it's too big.

  • Really important to keep css specificity as low/flat as possible. The best way to do styling is single class selectors.

Overall , your solution is good. Hopefully this feedback helps.

Marked as helpful

1

@BerkePalamutcu

Posted

thank you for your time explaining me my mistakes. I will update the codebase respectfully ! :) Have a nice day ahead

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