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

@DropperDEV

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 find difficult adjusting the width and height of main container. Margin´s area. Its ok having a loose element (button) outside of a div or something?

Community feedback

Hassia Issah 50,670

@Hassiai

Posted

Replace the <h2> with <p> and <h3> with <h2> to fix the accessibility and warning issues.

Use the colors that were given in the stylguide.md found in the zip folder of the challenge.

add box-sizing border-box to the *{} or the body , the box-sizing -border box deduct the padding value from the width value instead adding it to the width value.

Give the main a fixed width value: e.g: main{width: 500px} Give the margins, width, paddings and border-radius a fixed value instead of a percentage value. Use rem or em as unit for the padding, margin, width and preferably rem for the font-size for more on this watch this https://youtu.be/N5wpD9Ov_To

you forgot to add a media query for the mobile design.

Hope am helpful. Happy coding

Marked as helpful

1

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