Design comparison
Solution retrospective
Hello Frontend Mentor community!....
This is my solution for the product preview component.
Feel free to leave any feedback! 😎
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Manu , congratulations for your new solution!
🎨 Here’s some tips to improve your component design:
1.A shortcut to deal with the multiple images in this challenge is by using the
<picture>
tag instead of importing thhis as an<img>
or using a div withbackground-image
. Use this tag to make the image change between mobile and desktop is to use<picture>
instead of<img>
wrapped in a div. Look that for SEO and search engine reasons isn’t a better practice import this product image with CSS since this will make harder to the image be found. You can manage both images inside the<picture>
tag and use the html to code to set when the images should change setting the devicemax-width
depending of the device (phone / computer) Here’s a guide about how to usepicture
:https://www.w3schools.com/tags/tag_picture.asp
2.The value you’ve used for the shadow make it too much dark and strong, to create a smooth shadow you need to give it less
opacity
and moreblur
. This is a better value for this shadow:box-shadow: 1px -7px 40px 6px rgb(67 90 128 / 22%);
✌️ I hope this helps you and happy coding!
Marked as helpful0 - @romila2003Posted about 2 years ago
Hi Manu,
Welcome to the frontend mentor community and congratulations 🎉 for completing this challenge, it was a great attempt. The card looks great but there are some issues I want to address.
- It is best practice to wrap the main content within the
main
tag which would ensure that your content is wrapped within the correct landmarks e.g.<main class="container"></main>
- You should also wrap the footer within the
footer
tag e.g.<footer class="attribution"></footer>
- The size of your card looks good, but I would suggest you increase it in mobile screen to around
300px
- I noticed you took the desktop-first approach however I would suggest you take the mobile-first approach as this is a better option in regard to rearranging your card and the elements within it, as you increase the screen size. Therefore, you should use the
min-width
property within your media queries instead of themax-width
property. Also, it would be better to change the media queries so that the card shows before 1400px and to 900px instead.
Overall, great attempt and wish you the best for your future projects so keep coding 👍.
Marked as helpful0@manujayakumarPosted about 2 years ago@romila2003 Thank you for the advice and the time taken to analysis my code. Next time, I will do better and won't repeat the same mistake! In future, I hope that you analysis my code again.
1 - It is best practice to wrap the main content within the
Please log in to post a comment
Log in with GitHubJoin 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