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

Plain-CSS Responsive Nft Card Component

Zorah 20

@ZorahScope

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


  1. How would I go about applying the image overlay hover using flexbox?

  2. The .container div had an additional 5px of height vs it's containing image , causing the overlay to bleed past the image a bit. Granted I found a solution with height: calc(100% - 5px); I don't understand why this was a thing.

  3. What are common best practices for structuring/organizing CSS? ( Besides loosely following the HTML order in terms of how I declared CSS, it's more or less spaghetti)

Community feedback

@mupinnn

Posted

Hi Eli! You made a great work. May this answer can help you further:

  1. You don't need flexbox at all to create the overlay. Just use one container element and put image inside it, then use ::before or ::after pseudo-element selector to create the overlay and use background-color + background-image on it.
  2. I don't have any idea why the div have an extra 5px event with box-sizing: border-box. For better and consistent element sizing, I recommend you to always use box-sizing: border-box.
  3. You can try BEM or if using Sass, you can try this https://sass-guidelin.es/#architecture.

Keep it up, buddy!

1

Zorah 20

@ZorahScope

Posted

@mupinnn I appreciate the feedback. Thanks :)

0
Zorah 20

@ZorahScope

Posted

Unsure how to avoid this issue with making the view art overlay clickable

https://dequeuniversity.com/rules/axe/4.3/link-name?application=axeAPI

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