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 using flexbox

diego 60

@dieghi-capri

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


All feedback is welcome

Community feedback

Adriano 34,000

@AdrianoEscarabote

Posted

Hi Norbert Dumashie, how are you?

I really liked the result of your project, but I have some tips that I think you will enjoy:

  • every Html document must contain the main tag, so we can identify the main content, to fix this, wrap all the content with the main tag. HTML5 landmark elements are used to improve navigation experience on your site for users of assistive technology.
  • Consider using rem for font size .If your web content font sizes are set in absolute units, such as pixels, the user will not be able to re-size the text or control the font size based on their needs. Relative units “stretch” according to the screen size and/or user’s preferred font size, and work on a large range of devices.

if you want to continue coding with px, you can download a very useful extension in vscode, it converts px to rem! link -> px to rem

The rest is great!

I hope it helps... 👍

Marked as helpful

1

diego 60

@dieghi-capri

Posted

@AdrianoEscarabote Thanks for the helpful advices!!!

1
PhoenixDev22 16,990

@PhoenixDev22

Posted

Hi diego,

Congratulation on finishing this challenge. Great job on this one! I have few suggestions regarding your solution:

HTML

  • The most important part in this challenge interactive elements. Since there's a :hover state on the image and means it's interactive, So there should be an interactive element around it. When you create a component that could be interacted with a user , always remember to include interactive elements like(button, textarea,input, ..) for this imagine what would happen when you click on the image, there are two possible ways: 1: If clicking the image would show a popup where the user can see the full NFT, here you use <button>. 2:If clicking the image would navigate the user to another page to see the NFT, here you can use <a>.
  • 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.

You should have used <a> to wrap Equilibrium #3429 and Jules Wyvern too.

  • Page should contain <h1> . The <h1> is most commonly used to mark up a web page title. This challenge is supposed to be one component of a web page. To tackle the accessibility issue in the report , you may use an <h1> visually hidden with class=”sr-only”. You can find it here.

According to mdn, <article> HTML element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable. In this challenge, you have misused the <article> as the NFT card is one component and all the content of blocks are related to a single subject or destination. You should remove all the article tags and I recommend to use <section> for the whole component .

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-view, icon-clock, icon-ethereum.

Profile images like that avatar are valuable content. The alternate text should not be empty.You can use the creator's name Jules Wyvern. Read more how to write an alt text .

look up a bit more about how and when to write alt text on images. Learn the differences with decorative/meaningless images vs important content

For middle part of the card , in each <li> there should be <img> and <p>.

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.

Adding rel="noopener" or rel="noreferrer" totarget="_blank"links. When you link to a page on another site using target=”_blank” attribute, you can expose your site to performance and security issues.

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

After you fix the issues, you can generate another report for your solution.

Hopefully this feedback helps.

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