Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Aurelian Spodarec
10,801 PointsWhat would you do to fix it?
If you look atthis https://aurelianspodarec.github.io/sassairbnb/ site, and if you go from mobile to destop, you see the image from 750px to some px that there is a gap.
Now, on mobile, the picture behaves good, but when it scales, it should have the same effect, and then on deskopt, like it is, on cover.
I woudl add a media query, but i was wondering what woudl you do to fix this.
And this is the site I'm re-coding. https://www.airbnb.co.uk/ if you load their site from mobile, there will be a picture not a vide, or at times there might be something different, since hey alwasy change it. Hopefully you get the idea.
1 Answer
Bryce Santos
11,157 PointsI was playing around with it and yeah, adding a media query could help. It looks like when the viewport is at its max, it ends up covering the kid's face as well. A quick fix could be to put a max-width: 100% on the picture. It'll stretch a bit, but at least the kid's face'll still be in.
Aurelian Spodarec
10,801 PointsAurelian Spodarec
10,801 PointsWell, I'm coming the site, so it shoudl cover the kids face, but what I ment is if you go from desktop to mobile, there will be a gap between picture and black bar : p but thanks