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 Component Using Flexbox

@MonarchRyuzaki

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


I would like to know about making images responsive, adding a purplish hue to the image(here I edited the image), want to know how to do that in css. Also in desktop size there is a small margin below the image. How to fix it???

Any Feedback is appreciated.

Thank You.

Community feedback

Akherousin 210

@Akherousin

Posted

  • you could create a pseudo-element(::before or ::after) on an image container element. Make it stretch the whole width and height of the container. And give it the purple color of your choosing, then play with the opacity till you like it.

.image { position: relative; }

.image::before { content: '"; position: absolute; inset: 0; background-color: purple; opacity: 0.5; }

  • usually inline elements do have magical white space. You could set display: block on the image to fix it.
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