@correlucas
Posted
πΎHello Mario Alberto, Congratulations on completing this challenge!
Nice solution and nice code! I can see that you paid a lot of attention to your code/design. If you donβt mind Iβve some tips for you:
1,THE PICTURE TAG is a shortcut to deal with the multiple images in this challenge. So you can use the <picture>
tag instead of importing this as an <img>
or using a div with background-image
. Use it to place the images and make the change between mobile and desktop, instead of using a div
or img
and set the change in the css with display: none
with the tag picture is more practical and easy. Note that for SEO / search engine reasons isnβt a better practice import this product image with CSS since this will make it harder to the image. 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 desktop + mobile.
Check the link for the official documentation for <picture>
in W3 SCHOOLS:
https://www.w3schools.com/tags/tag_picture.asp
2.Youβve used px
as the unit for sizes but the problem with pixels is that its not optimized for multiple devices and screens. So a good fit its to use rem
or em
that have a better performance and make your site more accessible between different screen sizes and devices. REM
and EM
does not just apply to font size, but to all sizes as well.
βοΈ I hope this helps you and happy coding!
Marked as helpful