Design comparison
Solution retrospective
How to scale up or down a fixed width background image like bg-curve image in this challenge while keeping its shape as original as possible?
Using position:cover alters the shape hence image curves dont display as original in width more than 375px for mobile and for desktop more than 1440px.
Community feedback
- @mbcod3Posted almost 5 years ago
Thanks a lot for your reply. I modified my own fylo code that I did for previous fylo project and I was thinking why I have min-height there. In the end I just left it there in this dark project as well.
I just completed huddle with curved sections. In that I used picture tag for those curve images. Since svg scale up and down perfectly those shapes are almost identical regardless of screen size. The only thing I was wondering was that is it a good idea to use html element for background images?
0 - @mattstuddertPosted almost 5 years ago
Nice work on this challenge. Using
background-size: cover;
(as you've mentioned) is the only real way you can do this. You're right that it won't look the same at other screen sizes, but that's to be expected when building responsive websites. It can never look absolutely perfect at all sizes. You've done a really good job on this, so well done! 👍Also, if you're wondering why the screenshot is looking odd for this solution, it's because of the
min-height: 60vh;
declaration on the.welcome
class. You can remove that and retake the screenshot and it will look normal again.Keep up the great work!
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