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
Request failed with status code 502
Not Found
Not Found
Not Found

Submitted

Order Summary Component Using HTML and CSS

@loki1205

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

Hassia Issah 50,670

@Hassiai

Posted

Replace <section class="card"> with the main tag and add the alt attribute alt=" " to all the img tags to fix the error and accessibility issues. The value of the alt attribute is the description of the image.

There is no need to give .card a height value, give .content a padding value for all the sides. this will replace the height of .card. Incrase the width of .card for it to be equivalent to the width of the design, for a responsive width, replace the width in .card with max-width. max-width: 420px

To center .card on the page, To center a content on a page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.

To center .card on the page using flexbox:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
To center .card on the page using grid:
body{
min-height: 100vh;
display: grid;
place-items: center;
}

This challenge requires a media query, in the media query, change the background-image of the body.

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

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