Submitted about 1 year ago
Stats Preview Card Component Using Flexbox
@MonarchRyuzaki
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
- @AkherousinPosted about 1 year ago
- 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 GitHubJoin 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