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 Card Component

@Adriangln11

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

Hassia Issah 50,670

@Hassiai

Posted

Replace<div class="container">with the main tag and <h2> with <h1> to fix the accessibility issue.

Use the colors that were given in the styleguide.md found in the zip folder you downloaded.

There is no need to give the body a width and height values.

To center .container on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.

Use rem or em as unit for the padding, margin, width and preferably rem for the font-size for more on CSS units watch this https://youtu.be/N5wpD9Ov_To

Replace the height value of .app with auto instead of 100vh. give .product-info a background-color of white. give .btn-container a padding top and bottom value. e.g. .padding: 16px 0;

In the media query, give .container a fixed width value instead of a percentage value. e.g: width:600px; . give .app and .img-container a height value of auto instead of 90%.

Hope am helpful.

Well done for completing this challenge. 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