Finally got the color over the image thanks for all the help
Design comparison
Solution retrospective
I finally got the color over the image by making a div called overimg which I made purple and slightly opaque then I put it in the same place as the image
Community feedback
- @correlucasPosted about 2 years ago
๐พHello Mauger, Congratulations on completing this challenge!
๐จ Here are some tips to improve your component design:
Instead of using this code:
.imgover { content: ""; background-color: hsla(277, 95%, 46%, 0.5); position: absolute; height: 300px; width: 375px; top: 50; left: 50; z-index: 2; border-radius: 0 5px 5px 0; }
You can use this code shortcut to reach the same color of the challenge. First add to the div containing the
background-color: hsl(277, 64%, 61%);
, then usemix-blend-mode
to make the color blend between the image and the background-color of the container. See the steps below to apply to theimg
orpicture
selector:img { mix-blend-mode: multiply; Opacity
โ๏ธ I hope this helps you and happy coding!
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