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-Review

#accessibility#animation
Taofeek Iyandaโ€ข 10

@Xperhub

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


  1. How do you work with flex and grid effectively?
  2. Dealing with with and max-width

Community feedback

Lucas ๐Ÿ‘พโ€ข 104,540

@correlucas

Posted

๐Ÿ‘พHello @Xperhub, Congratulations on completing this challenge!

Your solution its almost done and Iโ€™ve some tips to help you to improve it:

Using <picture> youโ€™ve more control over the elements and its better than using the product image as <img> or background-image. Look that for SEO and search engine reasons it isn't a better practice to import this product image with CSS since this will make it harder to the image. You can manage both images inside the <picture> tag and use the html to code to set when the images should change setting the device max-width depending of the device (phone / computer) Hereโ€™s a guide about how to use picture: https://www.w3schools.com/tags/tag_picture.asp

See the example below:

<picture>
  <source media="(max-width:650px)" srcset="./images/image-product-mobile.jpg">
  <img src="./images/image-product-desktop.jpg" alt="Gabrielle Parfum" style="width:auto;">
</picture>

โœŒ๏ธ I hope this helps you and happy coding!

Marked as helpful

0
Krishna Tiwariโ€ข 80

@krishna-cyber

Posted

i have noticed some of the points that may icrease your code efficiency and optimized your code

  1. use font properly ๐Ÿ’ป 2)use flexbox it solves a lot problem easily ๐Ÿ”– why you are using unnecesary div elemtnt please fix this out ... using less tags is better practice

Marked as helpful

0

Taofeek Iyandaโ€ข 10

@Xperhub

Posted

@krishna-cyber Thank you for the feedback, where will you advise the use of flexbox ?

0
Jagpratap Singhโ€ข 50

@jagpratap

Posted

@Xperhub i mostly use flex only. In flex, i mostly uses align items, justify-content properties in parent element and it solves my most problems. some times flex direction property also come in handy. for max/min, i use with heights for container as my content inside can extent over i hope this answers your queries.

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