Design comparison
Solution retrospective
it was difficult to put color on image. i want to have your opinion on my class names and HTML structure.
Community feedback
- @catherineisonlinePosted almost 2 years ago
Hey, for the image to match the color, I did something like this, I hope that helps, sizes might not fit your solutions but you can adapt it depending to your own code:
<div class="image-container"> img class="main-image" src="images/image-header-mobile.jpg" alt=""> </div> .image-container { display: inherit; position: relative; width: 100%; border-radius: 0 10px 10px 0; background-color: hsl(277, 64%, 61%); } .main-image { width: 100%; height: 100%; position: relative; background-size: cover; border-radius: 0 10px 10px 0; mix-blend-mode: multiply; opacity: 0.75; }
IF THIS WAS HELPFUL PLEASE MARK IT AS HELPFUL 🤩
Marked as helpful1 - @AdrianoEscarabotePosted almost 2 years ago
Hello Arash Kazerouni, how are you? I truly loved your project's outcome, however I have some advice that I hope you'll find useful:
To get closer to the photo overlay effect, you'd better use mix-blend-mode. All you need is the div under the image with this background color: hsl(277, 64%, 61%); and position mix-blend-mode: multiply and opacity: 80% on the image or apply image to activate the overlay by blending the image with the div's color. See the code below:
img { mix-blend mode: multiply; opacity: 80%; }
You can read this content which is explaining these effects with mix-blend-mode: click here
We have to make sure that all the content is contained in a reference region, designated with HTML5 reference elements.
native HTML5 reference elements:
<body> <header>This is the header</header> <nav>This is the nav</nav> <main>This is the main</main> <footer>This is the footer</footer> </body>
The remainder is excellent.
I hope it's useful. 👍
Marked as helpful1@arashKazerouniPosted almost 2 years ago@AdrianoEscarabote hello Adriano. im really happy that you loved outcome. and your hint on image and semantic HTML structure was really helpful.
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