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 Order summary Css HTML

@pouripz

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


Hello, I have a problem with the background of the site. What would you do if you wanted to design the background to look like this project? How do you place the pattern? Thank you for helping me

Community feedback

Ornelle 70

@Blackysynch

Posted

Hi congrats on completing the challenge.

for the background I suggest using contain instead of cover this ensures that the background fits into the container element.

In your code

body {
font-family: "Red Hat Display", sans-serif;
font-size: 1.6rem;
background-image: url(./images/pattern-background-mobile.svg);
background-repeat: no-repeat;
background-size: cover;
background-color: var(--pale-blue);
}
 
/*Responsive*/
body {
background-image: url(../images/pattern-background-desktop.svg);
background-size: cover;
background-position: top;
}

replace by background-size by

body {
background-image: url(../images/pattern-background-desktop.svg);
background-size: contain;
}

The background-position is not needed. contain takes care of the sizing according to container size.

I hope this can be helpful to you...

Marked as helpful

1

@pouripz

Posted

@Blackysynch thanks a lot

0
Kamania 170

@Kamania

Posted

I experienced the same issue. I temporarily resolved it by using Internal CSS. Insert the background image in the css internally

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