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 with Grid

@gbtan1991

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


What would be the best practice to make this responsive in any sizes of the screen

Community feedback

@BilalSalmi

Posted

Hi Gilbert, well done!

Your design is already responssive, all you need to do to optimize it is to modify the div with class named ".card-wrapper". it will be prefectly centered!

.card-wrapper { background: var(--white); border-radius: 10px; display: grid; grid-template-rows: 1fr 2fr; grid-template-columns: 1fr; width: 344px; height: 600px; margin: auto; margin-top: 10px; margin-bottom: 20px; /* margin: 30px 15px 10px 15px; */ }

you forget to set margin to "auto".

To fix your Accessibility report issues consider to read more about the following topic which is as follows:

  • Html semantic elements click

That is, Keep going!

Marked as helpful

1

@gbtan1991

Posted

@BilalSalmi Thank you for your guide. Now it's centered on every type of device. Also, the Accessibility report was done I've changed some div to semantic tags. Thanks again

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