product-preview-card-component-main - basic html and css
Design comparison
Solution retrospective
π Hello, Frontend Mentor coding community. This is my solution for the PRODUCT PREVIEW CARD COMPONENT MAIN
π₯ Feel free to leave any feedback and help me improve my solution or make the code clean!
π€© I had a lots of fun building this challenge!
π I'll be happy to hear any feedback and advice!
Community feedback
- @correlucasPosted about 2 years ago
πΎHello NEERAJ VERMA, congratulations for your new solution!
Your product card is really good done, there's not much to say about it, but if you want to improve it a little bit more, you give it a better alignment with
flexbox
see the code below:body { min-height: 100vh; background-color: hsl(30, 38%, 92%); display: flex; align-items: center; justify-content: center; }
Add semantic tags to replace the
div
withmain
for example and use thepicture
tag to manage the product image use it, <picture> to wrap both desktop and mobile images together in the same tag, and render each image depending of the device (phone / computer) by the settings for the width you'll insert in the html If you're not familiar with thepicture tag
you can look at the documentation to see how to set it:https://www.w3schools.com/tags/tag_picture.asp
π I hope this helps you and happy coding!
Marked as helpful0
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