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

Card with hover effects, flexbox

Leaβ€’ 160

@Hatchino

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


The most difficult was the hover effects but I think the challenge was taken up. I'm waiting for your FeedBack, thanks :)

Community feedback

Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHello @Hatchino, Congratulations on completing this challenge!

πŸ‘¨β€πŸ’» Here are some tips to improve your solution code:

1.Fix the component responsiveness, its not working yet and this is due the fixed width you've applied to the container. The difference between width and max-width is that the first(width) is fixed and the second(max-width) is flexible and make the element shrink when the screen starts to scale down. So if you want a responsive block element, never use width choose or min-width or max-width.

2.The image is not responsive yet, a quick way to make any image responsive and respecting the container size is to add display: block and max-width: 100% to the <img> selector. To improve the responsiveness even more adding the auto-crop property you can add object-fit: cover to make the image crop inside the container its inside.

img {
    display: block;
    object-fit: cover;
    max-width: 100%;
}

✌️ I hope this helps you and happy coding!

0

Leaβ€’ 160

@Hatchino

Posted

Thank you @correlucas, I fixed the responsive component, it is true that I have the annoying habit of putting fixed widths.

Happy coding too !

1
Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

@Hatchino You're welcome Lea, than say me if works and If was useful for you! Have a good night.

0
Leaβ€’ 160

@Hatchino

Posted

Hello @correlucas, I noticed a mistake at the top right and bottom left border. I have no idea how to fix it.

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