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

Prduct Preview Card Component using HTML5 and CSS3

Raj Patelโ€ข 370

@rajkp10

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


Good challenge for the beginner responsive web designers.

I completed this challenge using CSS FlexBox and Grid.

Any kind of suggestions regarding code or design are most appreciated. ๐Ÿ™‚

Community feedback

@MelvinAguilar

Posted

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

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

HTML ๐Ÿ“„:

  • The product image is not a decoration. You must not use the background-image property to add the product image. Instead, use the <img> and <picture> tag to add the image. Use the background-image property only for decorative images that do not add any information to the page.

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. This can cause accessibility issues for users who have set their browser to use a larger font size. Source ๐Ÿ“˜.
  • The width: 100vw property in the .container tag is not necessary. This will create a horizontal scrollbar on some devices.
  • Use min-height: 100vh instead of height: 100vh. The height property can cause your component to be cut off on small screens, such as a mobile phone in landscape mode.

I hope you find it useful! ๐Ÿ˜„

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