Design comparison
Solution retrospective
I'm new to programming and ready to learn. Any tip is welcomed. Can someone, please, explain how to overlay image with color? I couldn't find anything online
Community feedback
- @Enmanuel-Otero-MontanoPosted over 2 years ago
Hello Danijel! Welcome
Another way to add color to the image is by using the filter property as follows👇
selector { filter: opacity(.6) drop-shadow(0 0 0 hsl(277, 64%, 61%)); }
Where it says selector, you put the selector you use for your image, you can change the opacity and drop-shadow values to vary the color.
Another thing, you must put the link to your repository to be able to review your code and give you better advice.
Any question, do not hesitate to ask.
Cheers!
1 - @DavidMorgadePosted over 2 years ago
Hey Danijel, congrats on finishing the challenge!
To get the desired result you need to add
background-color: blueviolet;
to the div that contains the img, then set the opacity of the image toopactity: 0.5;
, with just this you will get the result like in the challenge! Also set your img width to 100%, so it doesn't overlay out of the container!You should try also to center your content in the screen using flexbox, it looks like is in the corner of the screen!
Hope my answer helps you for future challenges!, try the background-color and tell me if it works!
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