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

Responsive Stats Preview Card Component

Mark 70

@Iron-Mark

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


Hello! I would be very grateful to receive your feedback on this project.

You could check out the GitHub repo link (I took time to document it ^-^ )

Questions:

  • What is the better approach you think I can do in solving this website, compared to what I have done?
  • Can you point out some of the mistakes I did, and some suggestions/corrections?

I struggled/was unsure of:

  • How I solve the overlay part
  • The 2nd container (Image)
  • The responsiveness of the website

Community feedback

@dxiDavid

Posted

Hey @Iron-Mark

Congrats on completing the challenge 👏🏾 The solution looks really good.

Here's how you could make a few improvements:

  • Make sure the title or main heading is contained in the <h1> </h1> tags to get rid of those warnings and improve accessibility then adjust the font size to fit the design.

  • As for the overlay, since there's no fancy animation going on in this situation, just put the image in a div, set the background color to that overlay color, and then slightly reduce the opacity of the image.

<div class="ctn-img">
      <img src="./images/image-header-desktop.jpg" alt="people in an office">
</div>
.ctn-img {
       background-color: hsla(277, 100%, 24.5%, 0.57);
}
.ctn-image > img{
       filter:brightness(40%)
       filter:opacity(40%);
}

You could also play around with other filters like brightness and saturation to get closer to the design. This will save you several lines of CSS code and markup. Just make sure the image fits in the div and you should be good.

Hope you find this helpful 🙂

Happy coding

Marked as helpful

1

Mark 70

@Iron-Mark

Posted

@dxiDavid Thank you so much, I really appreciate your time making this feedback! I didn't realize about using the filter and opacity. Good take on that...

0

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