Submitted over 2 years ago
leighton's solution to stats card
@LBuchananCates
Design comparison
SolutionDesign
Solution retrospective
Used html and css. Had some trouble with color overlay for image. Any feedback and advice is welcome :]
Community feedback
- @riverCodesPosted over 2 years ago
Hey, good job on the challenge! For the overlay, you can do this:
- Delete your img tag and apply it as a background image on it's container. Use the background image properties to size your image accordingly.
- Use pseudo element before on the background image div. Make sure it has an empty string content.
div.bg-img::before { content: " "; }
something like this. - Make the background image container relatively positioned and absolutely position the before child on top of it. Set your background color to purple or whatever you want, and it should apply over your image. In case it doesn't check your z-index order.
- You can also apply blending modes like color, hue, hard-light using the mix-blend-mode property to mix the two elements together.
Hope this helped!
Marked as helpful0
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