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 Page using HTML and CSS

@AnthonyPA0902

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


I love doing challenges on FE Mentor because it helps me improve my FE skils. I didn't have much difficulty this time except for that I don't know how to make the background change when switching to mobile. Anyone can provide the code for that ? Thanks so much for reading this

Community feedback

retr0web 250

@retr0web

Posted

Hi Anthony!

Background issue can be solved with media queries, where you change the url to background-image.

Additionally, I would suggest editing some of the properties, like bg-size, bg-position, bg-repeat.

Here is the link to resource you can use to solve the issue:

And as a tip, you can set bg-color as the other color that compliments background

As for solution this one worked for me:

body {
    background-image: url("./images/pattern-background-desktop.svg");
    background-repeat: no-repeat;
    background-position: top;
    background-size: contain;
    background-color: hsl(225, 100%, 94%);
}

@media (max-width: 960px) {
    body {
        background-image: url("./images/pattern-background-mobile.svg");
    }
}

It's not perfect, but does the job.

Hope it helps!

0
Nurio34 510

@Nurio34

Posted

For the question, ask chat gpt about how to use picture element to make an img has different src's in different screen widths

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