Design comparison
Solution retrospective
The color of the image overlay doesn't look quite right for me, although I had the figma design and took the color and opacity directly from it, is it just the browser or have I done something incorrectly?
Community feedback
- @catherineisonlinePosted almost 2 years ago
Hey, for the image to match the color, I did something like this, I hope that helps, size might not fit your solution but you can adapt it depending on 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 🤩
0 - @AdrianoEscarabotePosted almost 2 years ago
Hi Kathryn, how are you? I really liked the result of your project, but I have some tips that I think you will enjoy:
As you know this project is based only on one page component, so no h1 is needed! because we don't know if this page will have a more important component, but it's always good to prevent accessibility errors so I think it would be good for you to add an
h1
in this component, besides being a good practice for when you are developing larger sites, don't worry forget abouth1
.<h1>Get <span>insights</span> that help your business grow.</h1>
The hero image has a color slightly different from the Figma design, if you want to match the color you can reach this using
mix-blend-mode
withmix-blend-mode: multiply;
. The multiply will make the image blend the div background and the opacity will make the image less evident and improve the blend between image/purple div. See the code below:img { mix-blend-mode: multiply; opacity: 0.8; }
The rest is great!
I hope it helps... 👍
0@KathrynDavies123Posted almost 2 years ago@AdrianoEscarabote Hi, I did try this with the img but the result is the same... I already had this on my overlay and still the result looks different than the design. Adding it to the img doesn't change it at all. Any ideas? Thanks
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