Design comparison
Solution retrospective
I couldn't figure out how to find the correct box-shadow value, and background-position for images. Please help me with this. Any other improvement feedback or suggestion is appreciated.
Thanks
Community feedback
- @ratul0407Posted about 1 year ago
Hey coder🚀🚀
Congratulations on completing this challenge🎉🎉🎉. The solution is pretty good. Onto your question,
- For the background images instead of using percentages
background-position: -50% 180%, 160% -150%;
,You can usevw
andvh
something like this,
body { background-position: right 50vw bottom 40vh, left 50vw top 50vh;
Now the problem with using percentages are that they would not behave as you want if the viewport changes a little bit as they are hardcoded. But with
vh
andvw
no matter what the screen size is they will always be visible and stay in the same place as they are relying on the user's view height and view width.✌- And for the box-shadow, there is hardly any box-shadow in the design. Maybe a little bit of shadow around the corners. Now to achieve such a small thing you have to play around with a lot of numbers (blur radius, spread radius etc....) and it is a little painful. So why don't you use a box-shadow generator to reduce the pain a little bit. Like this one or maybe this one
I hope it was helpful for you👍👍
Happy coding brother🙂🙂
0 - For the background images instead of using percentages
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