Design comparison
Solution retrospective
For some reason the background images move with zoom-in / zoom-out and unable to stay in fixed position. Anyone have idea on how to fix this?
Community feedback
- @rilindtasholliPosted about 3 years ago
Hello Cindy, congrats on your solution 👍 It's very nice.
To fix the issue you have, instead of using percentage(%) for positioning background images try using viewport units (vw for width and vh for height). And also define the position values (top, right, bottom, left) because if we don't then by default the first value is for left and second value is for top.
So change this line of code:
background-position: -150% 150%, 200% -100%;
To this:
background-position: right 45vw bottom 45vh, left 45vw top 45vh;
I hope this was helpful 🙂
Another small detail you can add is to make the card responsive. You can check my solution here
0@ghks0201Posted about 3 years ago@rilindtasholli Hi there, thank you so much for the suggestions! I have been searching to solve the background image issue but to no avail 😥 so I feel really grateful for your help!
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