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

Stats preview card component using html css

Binh05•470
@Binh05
A solution to the Stats preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What challenges did you encounter, and how did you overcome them?

At first, I set the height of the background to 100vh, which caused the content to overflow when I designed for smaller screens. It took me a while to realize the issue and change the height to min-height: 100vh.

main {
    background-color: var(--main-background);
    min-height: 100vh;
    display: grid;
    place-content: center;
}
What specific areas of your project would you like help with?

This is my first time using overlay in CSS. I noticed that in the frontend design, the person in the image appears to have a stronger color tone compared to my solution. I’d appreciate any feedback on my CSS and suggestions on how I can improve it.

.card .img::after {
    content: '';
    position: absolute;
    background-color: var(--accent);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    opacity: 0.7;
    border-radius: 0 .5rem .5rem 0;
}
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 Binh05'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

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