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 Solution

aabc24โ€ข 220

@aabc24

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


It took me a while to achieve it, but here is my solution.

Try to apply good practices, but if not it seems to have been the case. Please tell meโ€ฆ

Community feedback

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

HTML ๐Ÿท๏ธ:

  • Use semantic elements such as <main> and <footer> to improve accessibility and organization of your page.
  • You could use the <del> tag to indicate the price that was before the discount.

CSS ๐ŸŽจ:

  • Instead of using pixels in font-size, use relative units like em or rem. The font-size in absolute units like pixels does not scale with the user's browser settings. Resource ๐Ÿ“˜.
  • The width: 100% property in the body tag is not necessary. The body tag is a block element and it will take the full width of the page by default.
  • Use min-height: 100vh instead of height. Setting the height to 100vh may result in the component being cut off on smaller screens, such as a mobile phone in landscape orientation.

I hope you find it useful! ๐Ÿ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

1

@MaximilianoDanielGarcia

Posted

Hi, @aabc24, great job!

If you want to see it perfectly centered you should add this:

.attribution {
   position: absolute;
   bottom: 25px;
}
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