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
Request path contains unescaped characters
Not Found
Not Found
Not Found
Not Found

Submitted

product preview card component

#bem#sass/scss
Elio Floresβ€’ 400

@elioflo

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Lucas πŸ‘Ύβ€’ 104,560

@correlucas

Posted

πŸ‘ΎHola Elio, congratulations for you solution hermano!

The product card component is good done, but there's some work to do around the responsiveness. Note that your card image its creating a huge gap between the second column in the mobile version.

My advice for your is using <picture> to manage both desktop and mobile images, importing both <img> using the <source> inside the picture for both images. You've done the import with background-image but isn't a best practice.

To avoid the product image creating the gap between the text content column you've to delete the fixed height for the img in order to have a regular gap. Note that you don't need to set the image height, this height will come from the its container size, in this case the div.

See the div thats givin this error below:

.card__img {
   /* height: 237px; */
}

Hope it helps and happy coding!

Marked as helpful

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