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

Vladโ€ข 60

@Vlaaaddd

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


I'm currently learning front end development sooo, I want to hear every opinion about my code. Thank you!

Community feedback

Zauri Khutsishviliโ€ข 680

@zauri-khutsishvili

Posted

Instead of using margins for centering you should use flexbox so it's in the middle of the screen at all screen sizes. Use this instead:


min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;

You can learn about Flexbox here and here. For learning CSS in general I recommend Kevin Powell's channel and his course on responsive design. You can also take a look at my solution.

Marked as helpful

1
Juan Hamiltonโ€ข 470

@hamilton-i7

Posted

Hello, Vlad!๐Ÿ‘‹

Congratulations for completing another challenge. You did a good job nailing the design๐Ÿ˜Š

A few basic things I would suggest to improve your solution:

  • Consider implementing semantic HTML tags, such as: <header></header>, <main></main>, <footer></footer> in order to give a more meaningful structure to your code. Your can read more about it here ๐Ÿ‘‰Semantic HTML5 Elements Explained.
  • Be mindful about closing all your tags.
  • Try to make your website responsive by using relative units like rem or em, especially on font sizes and also providing the right layout depending on screen size. For this I would suggest checking out the basics of media queries (i.e. @media (min-width...)). More on that here ๐Ÿ‘‰ Responsive Web Design - Media Queries.

Hope this all helps you and happy coding!๐Ÿ˜Ž

Marked as helpful

1

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