Design comparison
Solution retrospective
In this project, I challenged myself to finish this layout within an hour. I didn't check much the margins of the element to the reference image so it might be not optimal. -Any feedbacks are welcome :)
Community feedback
- @correlucasPosted about 2 years ago
👾Hello @jayrnoel, congratulations on your solution!
Nice code and nice solution! You did a good job here putting everything together. I’ve some suggestions for you:
1.I saw that for some properties you’ve used
rem
and for otherspx
. In this case, it is better to use only one kind of unit to have a better organization for your code.relative units
asrem
orem
have a better fit if you want your site more accessible between different screen sizes and devices.REM
andEM
does not just apply to font size, but to all sizes as well.2.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%; }
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@jayrnoelPosted about 2 years ago@correlucas Thank you for your feedback! I have just learned about blending mode in CSS from your feedback. I'm still getting used to using
rem and em
units because I always think in pixels. Sometimes I just usepx
from habit aside from anything that relates to fonts (font padding, font margin). I hope I can get more consistent in the future.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