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 (πŸ’¬ HTML & CSS)

Alexandre JOLIETβ€’ 170

@alexandre-joliet

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


Hello community!

This is my solution for the NFT preview card component challenge.

Very insteresting project and quite challenging with the switch of pictures when hovered. I spend litteraly hours between researching and trying (but learn a lot about pseudos, anchor and positioning in the process).

I finally found an interesting solution proposed by Vanza Setia, so thanks to him πŸ™.

Otherwise, no other issue encountered!

I'll be happy to hear any feedback and advice!

Community feedback

PhoenixDev22β€’ 16,950

@PhoenixDev22

Posted

Hello

Congratulation on completing this challenge. Excellent work! I have few suggestions regarding your solution, if you don't mind:

HTML

  • 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.
  • For any decorative images, each img tag should have empty alt="" and add aria-hidden="true" attributes to make all web assistive technologies such as screen reader ignore those images in (icon-ethereum, icon-clock ).
  • Profile images like that avatar are valuable content. The alternate text of the avatar’s image should not be Avatar, it’s meaningless. You can use the creator's name Jules Wyvern. Read more how to write an alt text
  • The alternate text should not be hyphenated, it should be human readable.
  • If you wish to draw a horizontal line, you should do so using appropriate CSS. You may remove the <hr>, you can use border-top: to the avatar's part.
  • There are so many ways to do the hover effect on the image, The one I would use is pseudo elements::before, ::after. You can use pseudo-elements to change the teal background color to hsla. Then the opacity can be changed from 0 to 1 on the pseudo element on the hover. Also using pseudo elements makes your HTML more cleaner as there's no need for extra clutter in the HTML.

Great job on this one. Hopefully this feedback helps.

Marked as helpful

0

Alexandre JOLIETβ€’ 170

@alexandre-joliet

Posted

Hello @PhoenixDev22!

Thank you very much for your feedback! I have fixed my code accordingly πŸ™‚.

Very interesting readings you gave me! Initially, I was thinking naively that every picture needed an alt text but I had no clue about their actual, and I suppose true purpose, for Accessibility.

And nice tip for the line! I didn't think to create it with the border of an adjecent element.

Thanks πŸ™!

1
PhoenixDev22β€’ 16,950

@PhoenixDev22

Posted

@JojoRider

Glad to help. Happy coding!

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