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

Tien Huynhโ€ข 50

@tienhuynh-tn

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


Hope this looks good :heart_eyes:

Community feedback

Mike Haydenโ€ข 1,005

@mickyginger

Posted

Hi Huรฟne Lรช! ๐Ÿ‘‹

This looks great!

I would be careful about using percentages for margin as you can get very unexpected results on different viewport widths.

I like that you've used the semantic tags header, main, and footer, but I think in this instance the main content is the component. header and footer probably make more sense in terms of an entire web page, or perhaps and article.

I would probably advise you set up your HTML like so:

<body>
  <main>
    <div id="component">
      <img />
      <h1>Order Summary</h1>
      <p>...</p>
      <div>...</div>
      <a class="primary" href="...">Proceed to payment</a>
      <a class="secondary" href="...">Cancel order</a>
    </div>
  </main>
  <footer>...</footer>
</body>

You can then set the background image on the main tag, and center the component using flexbox:

main {
  display: flex;
  align-items: center;
  justify-content: center;
}

I would then set a max-width on the component:

#component {
  max-width: 425px;
}

Hope that's useful! ๐Ÿค“

Marked as helpful

1

Tien Huynhโ€ข 50

@tienhuynh-tn

Posted

@mickyginger Thanks for your helpful feedback. I will update in the future <3

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