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 using css grid

tony/c.dev 130

@tony1c

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


So I have a problem. The overlay color of the image is way lighter than it should be. What did i do wrong? Also, any more feedbacks appreciated.

Community feedback

@catherineisonline

Posted

Hey, for the image to match the color, I did something like this, I hope that helps, size might not fit your solution but you can adapt it depending on your own code:

<div class="image-container">
img class="main-image" src="images/image-header-mobile.jpg" alt="">
</div>

.image-container {
  display: inherit;
  position: relative;
  width: 100%;
  border-radius: 0 10px 10px 0;
  background-color: hsl(277, 64%, 61%);
}
.main-image {
  width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  border-radius: 0 10px 10px 0;
  mix-blend-mode: multiply;
  opacity: 0.75;
}

IF THIS WAS HELPFUL PLEASE MARK IT AS HELPFUL 🤩

Marked as helpful

1
Hassia Issah 50,670

@Hassiai

Posted

In the tinted-image, remove the linear gradient value, only specify the background image, background-color and background-blend-mode: .tinted-image{ background-color: hsl(), background-image: url(); and its properties, background-blend-mode: multiply} , this should help you with the overlay hope am helpful . HAPPY CODING

Marked as helpful

1

tony/c.dev 130

@tony1c

Posted

@Hassiai It helped a ton. Only thing is that I still cant get the same color but atleast it's way darker this way. Already made the changes. Thanks a lot!

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