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 Card Component

Athira 130

@athirasarman

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


Hi all, Here is my NFT Preview Card Component project done in angular. Waiting for your valuable feedback on this.

Thanks

Community feedback

@solvedbiscuit71

Posted

Hi Athira, Good work on your first angular project in frontendmentor!

I have some tips to improve your code,

  • wrap everything inside the body with a <main> tag to avoid accessibility issue.
  • use <div> tag instead of <span> for element with class "detail","eth","time"
  • use display: flex with align-items: center in "eth","time" and footer to vertically center the image and text.
  • add the hover state for <span class="name"> element.
  • add min-height: 100vh; in <main> tag to vertically center the card.

Addressing the use <div> instead of <span>, we generally use <span> as a "leaf node" means that it doesn't have other childNode except the textNode. it's a best practice

Hopefully you find these suggestion helpful 😊

2

Athira 130

@athirasarman

Posted

@solvedbiscuit71 Hi, Thanks for the response. There is no accessibility issue as everything is wrapped inside <main> tag. Whatever HTML issues I am getting issues because of ng-content which is getting added by angular. How to get rid of that?

0

@solvedbiscuit71

Posted

@athirasarman you are right i didn't notice it in the first glance but, getting the accessibility issue for not wrapping everything in main tag is a common thing that people do.

Anyways, about the HTML issue idk because i haven't tried Angular myself try reaching out the slack community for further help.

Marked as helpful

0
Athira 130

@athirasarman

Posted

@solvedbiscuit71 Sure. Thanks

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