Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Order Summary Component

P
Arthur•290
@ArthurPog
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


2 problems so far:

I didn't know how to group the "Music Icon" and "Annual Plan" together while having the whole row justified and vertically centered at the same time.

I used these rules to vertically centre my content in the body: body { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

The problem with this is that when I make my browser screen really short, let's say less than 500px, the top of the content starts to cut off and it won't scroll up.

So I fixed it by creating conditional CSS where I monitor the height of the screen. This is not elegant and I feel deeply ashamed :) Any advice on how to actually stick the content to the top of the screen, when the viewing height becomes too small, with the possibility to scroll, would be much appreciated.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Arthur's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License