Design comparison
Solution retrospective
I used opacity on the overlay of the image, but could not seem to figure out how to make it look like the example.
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Sunbear Day, congratulations on your first solution!
Nice code and nice solution! You did a good job here putting everything together. I’ve some suggestions for you:
To get closer to
overlay effect
on the photo as the Figma Design its better you usemix-blend-mode
. All you need is thediv
under theimage
with thisbackground-color: hsl(277, 64%, 61%);
and applymix-blend-mode: multiply
andopacity: 80%
on theimg
orpicture
selector to activate the overlay blending the image with the color of the div. See the code bellow:img { mix-blend-mode: multiply; opacity: 80%; }
✌️ I hope this helps you and happy coding!
0 - @VCaramesPosted about 2 years ago
Hey @SunbearDay, some suggestions to improve you code:
-
Your not using the Alt Tag effectively for you image. You want to describe what the image is; they need to be readable. Assume you’re describing the image/icon to someone.
-
The heading for this card should be an <h1> Heading since its the only content in this page.
-
For media queries, I definitely suggest using em for them. By using px your assuming that every users browser (mobile, tablet, laptop/desktop) is using a font size of 16px (this is the default size on browser). Em's will help with users whose default isn't 16px, which can sometimes cause the your content to overflow and negatively affect your layout.
More Info:
https://betterprogramming.pub/px-em-or-rem-examining-media-query-units-in-2021-e00cf37b91a9
Happy Coding!
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