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

Product Preview card using Flexbox and srcset

@theCephas

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


Hello community of devs, I will appreciate feedbacks. Had to delete the first type I made due to lots of inconsistencies, feed back for this won't hurt. Cheers.

Community feedback

@ezeaniiandrew

Posted

Nice Design. Just three corrections:

  1. I noticed in your README file, you had problems when when adding margin and padding to your work. It’s good practice and saves you a lot of time in debugging your code when you add these code at the beginning of your css file:
  • { box-sizing: border-box; margin: 0; padding: 0; }
  1. Try and place the card in the middle of the page. You can use add the below code to your body tag:

display: grid; Place-items: center;

3)There is no need to add pixels when specifying the width and height of an image in HTML cos it’s already in pixels

Marked as helpful

0

Account Deleted

Hello @theCephas,

So nice work! Your design is great in the screenshots comparison view. Reading your code I see you're using the same class for div and p price. Maybe this affects your styles if you make some changes in the future. I watched this video and a little trick to use in cards to align elements (in minute 14), she's awesome. This could work to align your elements in the card section for desktop view. https://youtu.be/qm0IfG1GyZU

Best regards from Argentina :)

0

@theCephas

Posted

@codernami thank you Aman :)

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