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 (I couldn't turn purple the image)

@eremitaito

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


How do I turn purple the image?

Community feedback

Lemnsa 110

@Lemnsa

Posted

Hi @aka_shiguero great job there 👍🏽.

There is a trick I use if you would not mind,

1. I create a div element with a background color purple, width and height same with the image's.

2. I set its position to absolute, so it should have an automatic z-index.

3. Use the values of left, top to adjust it.

4. Add opacity to the div class, till the image is same as in the design.

I wish it helps you.

Marked as helpful

1

@eremitaito

Posted

@Lemnsa Thanks for the trick! It is really helpful!

0
Lemnsa 110

@Lemnsa

Posted

@eremitaito You are welcome. Happy coding 🦾

1

@cuauh-cabrera

Posted

Hi @eremitaito!

You can put your <img> inside a <figure><figure> element, then apply a purple (accent) color background to the <figure> element, and finally, apply a "mix-blend-mode: multiply” to your <img>.

Marked as helpful

0

@eremitaito

Posted

@cuauh-cabrera thanks!

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