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

Responsive Product Preview Card Component

P

@muthucodes

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I faced difficulty in doing the following. I found solutions to these but would love to hear your views and suggestions. Also point out any errors you find.

  1. Including the svg icon in the 'Add to Cart' button. My solution works now. But I'd love to hear better ways of doing it.
  2. I have used a grid with 2 cells and made the right side cell as a flexbox. The image and flexbox contents kept overflowing out of the grid cells. I fixed this by making the top and bottom margin as zero for the .card component. Is this the correct fix?
  3. To get the left side border of the image to be rounded, I used 'overflow: hidden' on the .card component. Another way to get the result would be to set a 'top-left' and 'bottom-left-border-radius' to the image. Is there any other way to do this?

Community feedback

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