Product preview card

Solution retrospective
I am pleased that the final look closely matches the sample design. I know my code isn't perfect and has room for improvement. Next time, I want to write more efficient, effective, and clean code.
What challenges did you encounter, and how did you overcome them?Initially, I struggled to fit the image properly on the card, and when I adjusted the card's border-radius, the image's border remained unchanged. After researching the issue, I discovered the object-fit property and set it to cover, which resolved the problem. I also couldn't find the cart logo in the downloaded files as the image was missing so I downloaded one from Google, though it doesn't exactly match the design.
I want to know how to write cleaner and more efficient code. I know that the HTML structure could be improved, and I believe there are ways to make my CSS styling cleaner and more effective. I want to make the code more readable and easier to understand.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Hamna's solution.
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