Design comparison
Solution retrospective
The image doesn't look good enough on larger screen
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Joseph Odunsi, congratulations for your new solution!
🎉 Nice solution and nice code! I can see that you paid a lot of attention to your code/design. If you don’t mind I’ve some tips for you:
1.The best to way to have this image and every image responsive and easy to work, its by creating a general property adding
display: block
andmax-width: 100%
to make it fits the size of the container the image is inside and also respect the container width while scaling, add alsoobject-fit: cover
to make the image auto-crop when resizing inside the column:img { display: block; object-fit: cover; max-width: 100%; }
2.Make your hero image have the same look and the color purple overlay, you need to use
mix-blend-mode
using themultiply
one.The mix-blend-mode CSS property sites how an element's content should blend with the content of the element's parent and the element's background.Here’s how you can add this to your
img
selector:img { mix-blend-mode: multiply; opacity: 84%;}
Here's a good article explaining these effects with mix-blend-mode:
https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode
✌️ I hope this helps you and happy coding!
Marked as helpful0 - @hyrongennikePosted about 2 years ago
Hi @dhatGuy,
Congrats on completing the challenge it is a good first attempt
Just a few suggestion for desktop as mobile seems fine. You can set the padding on the following rule to 0 and make the changes and add the following to the media query for desktop:
body .card { max-width: 1170px; flex-direction: row-reverse; padding: 0; } .card > div { flex: 1; } img, picture { width: 100%; }
The above is a good starting point. Hope it helps.
Marked as helpful0
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