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-preview-card-component-main - basic html and css

Neeraj Vermaβ€’ 70

@neeraj-verma-20

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


πŸ‘‹ 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

Lucas πŸ‘Ύβ€’ 104,440

@correlucas

Posted

πŸ‘Ύ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 with main for example and use the picture 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 the picture 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 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