Design comparison
SolutionDesign
Solution retrospective
Hi all,
Did anyone else place a div container over the image to change the its color? How did you change the image's color?
Community feedback
- @Njoura7Posted over 2 years ago
hello, nice try you are almost there ! here is what you should do:
<div class="container"> <img src="images/image-header-desktop.jpg" alt="Image" class="image"> <div id="overlay"></div> </div> you should nest your image with another div and then give .container{position:relative;}#overlay{ position:absolute; width:100%; height:100%; }(so that it takes the whole space and then add the color with a specific opacity between 0.5 and 0.2 maybe)
Marked as helpful1
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