Order Summary Component Using HTML and CSS
Design comparison
Community feedback
- @HassiaiPosted almost 2 years ago
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 GitHubJoin 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