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 with React

Galih Arizzaโ€ข 230

@chadittya

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


The hardest part this project is I can't find background position that match the design. If there is feedback that can help me match the background position as same as design, please help me.

Thank you!

Community feedback

@MelvinAguilar

Posted

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

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

  • In devices with a width of 320px, the decorative image is not displayed. Always check your solution in devices up to 320px wide, as this width is recommended to avoid losing any type of information on a website.
  • Your mobile-image is showing in desktop devices, this issue is likely due to the order of your media queries. Media queries are read by the browser from top to bottom, and the last one that matches the current screen size will be applied.

    A possible solution (index.style.css):

    body {
        background-color: #e0e8ff;
        background-repeat: no-repeat;
        background-image: url("../assets/images/pattern-background-mobile.svg");
        font-family: Red Hat Display,sans-serif;
        background-size: contain; /* Use contain instead of cover*/
    
        /* background-position: top; */
        /*font-size: 16px;*/ /* The default font size is 16px and use font-size in rem*/
        /* justify-content: center; */
    }
    
    @media (min-width: 720px) {
        body {
          background-image: url("../assets/images/pattern-background-desktop.svg");
        }
    }
    
     /* Remove all this media query */
    @media (min-width: 375px) {
        body {
          /* background-image: url("../assets/images/pattern-background-mobile.svg"); */
        }
    }
    

I hope you find it useful! ๐Ÿ˜„

Happy coding!

Marked as helpful

1

Galih Arizzaโ€ข 230

@chadittya

Posted

@MelvinAguilar Hello Melvin, as always your feedback is helping me improve, thank you! I appreciated it!

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