Design comparison
Solution retrospective
I have an issue with the color of the cover img, can I set the overlay color to the img tag or I use another div and set its position: absolute ?? thank you for any advice, I will appreciate it
Community feedback
- @correlucasPosted over 2 years ago
πΎHello To Dat, congratulations for your new solution!
Another great solution, the component is beautiful! Now you miss two things, to align the content vertically inside the card and the overlay effect.
To make the container vertically aligned use
align-items: center;
@media (min-width: 1200px) .card { display: flex; flex-direction: row-reverse; min-height: 20rem; align-items: center; }
To add the exact same purple overlay effect for the image, matching the design files you can use,
filter
ormix-blend-mode
. See the code belowimg { mix-blend-mode: multiply; opacity: 70%;}
π I hope this helps you and happy coding!
Marked as helpful0@tltd0807Posted over 2 years ago@correlucas hi, thank you very much for your advice, I fixed it but another bug appears π«π«π« when the screen size is about 1200px (just a little bit) the img doesn't fit the container (where I set the background color for img mix-blend-mode) What can I do for that or the keyword for it? Thank you once a again
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