Design comparison
Community feedback
- @snehamoybagPosted over 2 years ago
Hi Sam 🙋♂️ Great job on completing this challenge it looks awesome 👏 Keep going!
Answer to your query : If you're talking about the "quote" background image then you can use
background-size
css property to resize your background images. For the units you can userem/ em/ % / px
etc.And similarly if you want to place background image at a certain area in your page then you can use the
background-position
css propertyHere are few useful links to learn more about them
Marked as helpful1 - Account deleted
Hi Sam,
What I did on my solution was calculate the original size of the image as rems, and then giving it a width value in rems that equaled 28 pixels per the figma design. I'm not sure if this is a good way of doing it, but it seems to work as intended.
I haven't used it yet, but it looks like srcset might be a good solution as well - I've seen it used as a solution for responsive images on both MDN and CSS-Tricks.
Hopefully this helps - I'm curious to see how others approach responsive images!
Marked as helpful1@samd1aPosted over 2 years ago@LazyDuckling thank you very much, that is definitely a much better way of resizing the images as it would account for different resolutions, haven't heard too much about
srcset
but I will definitely look into it in the future.0 - @Derrick-ndemoPosted over 2 years ago
If you are talking about the quote image, try using background positioning. You can check out my solution if that's ok
1
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