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

@neew18

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


At first, I found it difficult to position the images. But after a few researches and readings, I solved it. Please review my code and leave some feedbacks about what I can improve more. Thank you!

Community feedback

Muhammadh 1,140

@Mr-jaw

Posted

Hello there 👋

Congratulations on completing the challenge

HTML 📄

  • When you are setting the alt attribute for the <img> tag, always describe the image best. for the Equilibrium image rather than saying alt="Card image cap" you could say something like this alt="A glass cube resting on its vertex in an equilibrium position". Because screen readers who can't see the image will know what it is through alt text.

  • replace <div class="attribution"> with <footer> tag to fix accessibility issues.

CSS 🎨

  • It is a good practice to use CSS custom properties. learn more about it here

You have done a great job by making use of relative units** 🔥👍

I hope this was useful 😊

HAPPY CODING

Marked as helpful

0

@neew18

Posted

@Mr-jaw Thank you!!! I will fix them.

0
Radasin 620

@Radasin

Posted

Its better to put the css file in a folder css then src, because most developers use a css folder (we get confused when the css style is in a folder who is named differently). You don't need to set height to auto its the default. The :root is for custom properties, if you want to set font size to 62.5% use html selector here is a video about css units at 1:44 is the font size set to 62.5% so the rem would be 10px. Lastly use alt attribute in img elements, its use when the img can't be showed and for screen readers.

Marked as helpful

0

@neew18

Posted

@Radasin thank you for your advice. I will fix them. I have a question. So I should make a css folder for css file separately. And if i have js file,a separate js folder for it?

0
Radasin 620

@Radasin

Posted

@neew18 You can make a separate folder. The names of the folders don't have to be css or js, they can be styles or scripts, just name them based on what content they have.

Marked as helpful

0

@neew18

Posted

@Radasin I understand now. Thank you so much!!!

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