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

Responsive NFT Preview Component

@NElnour

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


Are there guidelines for flexbox nesting depth?

Community feedback

PhoenixDev22 16,950

@PhoenixDev22

Posted

Hello @NElnour ,

I have some suggestions regarding your solution:

  • Anything with a hover style in a design means it's interactive. you need to add an interactive element around the image Equilibrium #3429.

  • For any decorative images, each img tag should have empty alt="" and aria-hidden="true" attributes to make all web assistive technologies such as screen reader ignore those images in (/icon-clock.svg", icon-ethereum.svg", /icon-view.svg )

  • the icon-view doesn't really need to be in the html and doen't need to be wrapped in an interactive element <a> , you could do it with css. If you want it to stay in html it needs to be aria-hidden:true ` or role presentation with empty alt

  • The alt text of the avatar shouldn't be alt="nft creator avatar" , it should be Jules Wyvern .Tips for writing 'good' alt text.

  • it's invalid html to wrap a heading element in an anchor tag. Swap those around so the anchor is inside the heading <h1><a href="#">Equilibrium #3429</a></h1>

  • don't use div for meaningful content .you can use <p> <p> Our Equilibrium collection promotes balance and calm.</p>

  • the link should be wrapping the original image and either have Sr-only text, an aria-label or alt text that says where that link takes you.

  • You can use an unordered list<ul> to wrapclass="nft-status">and in each <li>, there would be <img > and<p>.

  • don't use span for meaningful content <p>Creation of <a href="#">Jules Wyvern</a></p>

  • No need for <hr/> , you can use border-top to theclass="user-info" ..

  • To center the card on the middle of the page , you can use the flexbox properties and min-height: 100vh for the <body>like this:

body{
display:flex;
align-items: center;
justify-content: center;
width: 100%; 
min-height: 100vh;

  • Never use px for font-size.

  • You should 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.

  • bg color to the image on the hover effect

Overall your solution is good , Hopefully this feedback helps.

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