Design comparison
Solution retrospective
Is there a way to tint an image that has been inserted into the HTML with an image tag?
Community feedback
- @pikapikamartPosted over 3 years ago
Hey, great work on this one. Though need to zoom out because your text are current overflowed from the container. Layout is good and the mobile state is good as well.
@brasspetals already mentioned key points^
For other suggestion/s :
- I really recommend for you NOT to use
vh
as a unit especially in a container or an large component. The reason that I had to zoom out, is because you declaredheight: 60vh
on yourcard
selector. What happens is that it limits the size, based on the viewport's height. So if a user have a small desktop or gadget height, then they will also get the same effect, which is the overflowed content. I suggest that you use other units likerem
and give a fixed height, or let the element inside it, give the container the dimension it needs. Please refrain from using such declaration.
Only that one. Overall, great job^
1@RaelindaPosted over 3 years ago@pikamart That’s good to know. I’m trying to learn best practices as I gain knowledge and I really appreciate you taking the time to give me this feedback. — Raelinda
0 - I really recommend for you NOT to use
- @brasspetalsPosted over 3 years ago
Hi, Raelinda! 👋
You can still use
mix-blend-mode
on animg
orpicture
element, which actually makes things a lot easier here, since to achieve the look of the design you need a combo ofmix-blend-mode: multiply
and opacity. If both the color and image are set as backgrounds to the same div, you can't get it quite right.In this instance, you could have an img or picture tag wrapped in a containing div. The containing div's background would be set to the purple color, and
mix-blend-mode
andopacity
could be set on the image to achieve the look.Using and
img
orpicture
element also makes handling the height/width of the image div MUCH easier, especially when it comes to responsiveness. Having to control the dimensions of an empty div is often a pain.1@RaelindaPosted over 3 years ago@brasspetals Thank you so much for that helpful advice! :) — Raelinda
0
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