Stats preview card component

Please log in to post a comment
Log in with GitHubCommunity feedback
- P@visualdenniss
Hey there,
your solution looks good overall! But there seems to be an issue with empty space on mobile, because you are using height: 140%, which might cause issues with changing screen-sizes. So instead simply u can use min-height: 100vh; e.g.
html, body { height: 100%; min-height: 100vh; }
and make height: 100%; for the main.
Also try to avoid giving a fixed height like height: 200px; as this will cause accessibility issues when the container contains some text element. Content with overflow, if the user decides to have bigger font-size to read. Finally avoid using px as much as possible, instead use rem or em. Here is a great resource on YT: https://www.youtube.com/watch?v=dHbYcAncAgQ
Hope you find this feedback helpful!
Marked as helpful - @Hassiai
There is no need to give the main a min-width.
To center .card on the page using flexbox, replace the height in the body with min-height: 100vh.
For the color of the image there is no need for linear-gradient in .hero-container rather give a background-blend-mode of multiply, a background-color of soft violet and opacity:0.8.
.hero-container{ background-image: url(); background-size: cover; background-color: hsl() background-blend-mode: multiply; opacity: 0.8; }
give .card a width of 80vw or max-width:1440px and width 80% for a responsive content.
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful
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