Submitted almost 2 years ago
Stats preview card solution. Mobile first approach
@kareemgurung
Design comparison
SolutionDesign
Solution retrospective
Please feel free to give your feedback.
Community feedback
- @HassiaiPosted almost 2 years ago
To center .stats-card on the page using grid, add min-height:100vh to the body.
For the color of the image , add mix-blend-mode: multiply, width of 100% ,height of 100% and opacity: 0.8
.img{ width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; opacity: 0.8; }
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful1 - @VCaramesPosted almost 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
- The
article
element is being used incorrectly ⚠️ and not needed for this challenge .
- The “image” in this component are purely decorative. ⚠️ Their
alt tag
should be left blank to hide them from assistive technology.
More Info:📚
https://www.w3.org/WAI/tutorials/images/
- The only heading ⚠️ in this component is the “Get insights that help your business grow” everything else will be wrapped in a
paragraph
element.
- The statistics at the bottom are a list ⚠️, so should be built using an
unordered List
element.
More Info: 📚
MDN <ul>: The Unordered List element
- To get the image to look like the FEM example ✅, you are going to want to use the
mix-blend-mode
along with themultiply
value and include aopacity
with the value of 0.8 to the image. Lastly, the image’s container must have the background color ofhsl(277, 64%, 61%)
.
Code:
img { opacity: 0.8; mix-blend-mode: multiply; } img-container { background : hsl(277, 64%, 61%); }
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! 👾👾👾👾♥️
Marked as helpful1 - The
Please log in to post a comment
Log in with GitHubJoin 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