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

Order Summary Component

Chykaβ€’ 60

@CrownedTechie

Desktop design screenshot for the Order summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Feedbacks pleasee

Community feedback

@MelvinAguilar

Posted

Hello there πŸ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

  • Using both min-width and max-width together can be redundant and might not achieve the desired responsiveness, and it essentially sets a fixed width for the component, similar to using width: 403.2px. You can use only max-width without specifying min-width
  • Use min-height: 100vh instead of height. Setting the height to 100vh may result in the component being cut off on smaller screens, such as a mobile phone in landscape orientation.
  • Use an empty alt attribute (alt="") for icons to signal their decorative nature to assistive technologies.
  • Opt for a button instead of an anchor tag for the "change" element, as it involves altering the order's plan. Buttons are more suitable for action-oriented tasks.
  • For desktop devices, use background-size: contain; to make the background adapt to the screen.

I hope you find it useful! πŸ˜„ Above all, the solution you submitted is great!

Happy coding!

0

Chykaβ€’ 60

@CrownedTechie

Posted

Thank you so much for your feedback @MelvinAguilar

  • My media query targeted min-width:900px. Initially, I used only max-width, then when I checked it's responsiveness at that 900px screen width, it compressed my container and the content was overflowing. So I had to use min-width to counter that issue. For the max-width, I used it to target the screen widths above 1440px.

  • I checked background-size: contain and I was having some empty spaces, so I opted for background-size: cover.

0

@MelvinAguilar

Posted

@CrownedTechie Ah, no, that's fine. I'm referring to the use of min-width and max-width in the .container element. Your adoption of a mobile-first approach with media queries is good. I'm specifically addressing lines 157 and 158 in your CSS:

 .container {
        width: 28%;
        min-width: 403.2px;  /* This line */
        max-width: 403.2px;  /* ... and this line */
}

Also, be careful with 'cover' because the background tends to occupy (cover) the entire screen, and it might result in distortion

Happy coding!

0
Chykaβ€’ 60

@CrownedTechie

Posted

Oh alright. Though I'm still confused. So is it better to just use width: 403.2px; to have a fixed width than using both min-width and max-width? @MelvinAguilar

0
Chykaβ€’ 60

@CrownedTechie

Posted

Thank you dear@MelvinAguilar

1
Daniel πŸ›Έβ€’ 44,230

@danielmrz-dev

Posted

Hello @CrownedTechie!

Your project looks great!

If you add a box-shadow to the card, it'll look even closer to the original design.

Other than that, you did an excelent job!

0

Chykaβ€’ 60

@CrownedTechie

Posted

Thanks dear. I need more practice on box shadowing, I still find it difficult @danielmrz-dev

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