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

HTML and CSS flex box

Ehab Nada 120

@hopamnada

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Travolgi 🍕 31,420

@denielden

Posted

Hi Ehab, I took some time to look at your solution and you did a great job!

Also I have some tips for improving your code:

  • add padding to card class
  • remove padding from main-img class and set width: 100%
  • add overflow: hidden to image class
  • try to add a little transition on the element with hover effect
  • instead of using px try to use relative units of measurement -> read here

Overall you did well :)

Hope this help and happy coding!

Marked as helpful

1

Ehab Nada 120

@hopamnada

Posted

@denielden Thank you Daniel, I did all the points you mentioned, you are very helpful. how can I use relative units to the card width and keep it is size fixed at any screen width ?

1
Travolgi 🍕 31,420

@denielden

Posted

@hopamnada You are welcome!

You can use exactly as you would with pixels. You can convert px to rem via online app or just go by eye.

Keep it up ;)

Marked as helpful

1

@optimusprime202

Posted

Hey @hopamnada, You’ve just about got it.

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