Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 4 years ago

Stats preview card using HTML & CSS

Alif Panglima Nurda•135
@blurrypxl
A solution to the Stats preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hi guys, I just finished this challenge. Please let me know if you have any suggestions, I'd really appreciate it :)

Thank you

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Jaydi•355
    @ruedasjnthn
    Posted almost 4 years ago

    The website responsiveness is great but the margin of the card component is not proportional

  • Nic•595
    @nicm42
    Posted almost 4 years ago

    This looks great.

    I have a suggestion with the position: absolute on the body. Absolutely positioning something takes it out of the flow of the document. When it is essentially the document, it's a bit of a weird idea.

    What you can do is instead change it to position: relative. On its own, adding position: relative to an element effectively does nothing, but what it does mean is that any children within it that are absolutely positioned are then positioned relative to their relatively positioned parent, rather than the document.

    Once you do that, you also no longer need the left: 0 and right: 0 on the body.

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
Frontend Mentor logo

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

Frontend Mentor

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

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub