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

Responsive Product Review Card html css flexbox grid & srcset

@chovole2020

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


Is the code well-structured, any tips to improve the coding? what other improvements can be made? I will appreciate everyones feedback, thank you :).

Community feedback

Christian 970

@FLCHRIS

Posted

Hi there!! ✌️

Congrats on completing this challenge! 🥳

I saw that you used the position property, to center your content, it's ok, but it can give you some problems. Instead use the grid property, like the following:

body {
    min-height: 100vh; // Add this
    display: grid; // Add this
    font-family: var(--ff-accent);
    background-color: var(--clr-secondery-200);
    color: var(--clr-neutral-500);
    font-size: var(--fs-14);
    font-weight: var(--fw-regular);
    /* padding: 1.75rem 1rem; */
    /* width: 23.4375rem; */
    /* position: absolute; */
    /* top: 50%; */
    /* left: 50%; */
    place-content: center; // Add this
    /* transform: translate(-50%, -50%); */
}

I hope I've helped 🙃

Happy coding!! ✌️

Marked as helpful

0

@chovole2020

Posted

Thanks for the feedback Christian 👍

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