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

Bryth 80

@BrythWrites

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


Looking for suggestions on how to get the overlay tint on the image to more closely match the hue of the design.

Community feedback

@FoxMalder-coder

Posted

Hi! I think it's additional needs to use some of filler (brightness or something else). You also can use just one tag for img to change source. Something like this: <picture> <source media="(min-width: 1200px)" srcset="images/desktop.svg"> <img class="image" src="images/mobile.svg" width="240" alt="-"> </picture> [More about in MDN] (https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) but it's a little bit complecated

0
Nakoya Wilson 1,530

@nakoyawilson

Posted

You can try using the mix-blend-mode css property to get the overlay to more closely match. For your code I would suggest changing the .img-container:after to .img-container:before or removing the pseudo element completely and adding the background color to the img-container class directly (If you choose to add the background color directly to the .img-container you'll also need to remember to add the opacity). Then add mix-blend-mode: multiply; to the mobile-img and desktop-img classes or create a shared class for both the desktop and mobile images and add the declaration to that.

0

Bryth 80

@BrythWrites

Posted

@nakoyawilson I opted to remove the psuedo class entirely and this method worked like a charm. Thanks for your advice!

0
Nakoya Wilson 1,530

@nakoyawilson

Posted

@BrythWrites You're welcome!

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