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

dd-order summary component

Daniel Daportaβ€’ 110

@Daporta

Desktop design screenshot for the Order summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Lucas πŸ‘Ύβ€’ 104,440

@correlucas

Posted

πŸ‘ΎHello Daniel, congratulations for your new solution!

Your component is perfect, but is not responsive yet, this is due the fixed width you've applied to the container.

The main difference between width and max-width is that the first property is fixed and the second is flexible, for example, a component with width: 450px; will not grow or contract because the size will be ever the same, but a container with max-width: 450px; or min-width: 450px; can grow or contract depending of the property you've set for the container. So if you want a responsive block element, never use width choose or min-width or max-width.

.card {
    margin: auto;
    max-width: 450px;
    background-color: #fff;
    border-radius: 20px;
}

πŸ‘‹ I hope this helps you and happy coding!

Marked as helpful

1

Daniel Daportaβ€’ 110

@Daporta

Posted

@correlucas, Thank you for the advice. I will have it in mind for future projects.

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