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

mobile-first using pure Css

Azkaβ€’ 480

@Azkanorouzi

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


Hey everyone πŸ˜€. this was quite easy for me, but as always I've learned a lot during the project . my only problem was with that image .😒 I used ::after for that color layer and reduced the opacity so that image become visible although I am not thoroughly happy with the result, since it seems ::after is not covering the image and it's slightly bigger, I don't know why that occurs but if you take a look at 400px or below you will realize what I am saying . 😭 but anyway I loved this challenge and, I love to know your though on this . thank you all πŸ’“ happy codding .

Community feedback

Lucas πŸ‘Ύβ€’ 104,580

@correlucas

Posted

Hello Azka, congratulations for your new solution!

Nice solution and nice design(where you get inspiration for this amazing design?)

Here's my tips to make the color overlay on the image, instead of using this lines of code:

.img-container::after {
    content: "";
    width: 100%;
    height: 100%;
    background: hsla(277, 63%, 30%, 0.699);
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 15px 15px 0 0;
}

To make your hero image have the same look and the color purple overlay, you need to use mix-blend-mode using the multiply one.The mix-blend-mode CSS property sets how an element's content should blend with the content of the element's parent and the element's background.

Here’s how you can add this to your img selector: img { mix-blend-mode: multiply; opacity: 84%;}

Here's a good article explaining these effects with mix-blend-mode: https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode

✌️ I hope this helps you and happy coding!

Marked as helpful

1

Azkaβ€’ 480

@Azkanorouzi

Posted

@correlucas from you Lucas, thank you for your amazing solution. πŸ™

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