Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Stats preview card solution. Mobile first approach

P

@kareemgurung

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Please feel free to give your feedback.

Community feedback

Hassia Issah 50,650

@Hassiai

Posted

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 helpful

1

@VCarames

Posted

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 the multiply value and include a opacity with the value of 0.8 to the image. Lastly, the image’s container must have the background color of hsl(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 helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

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