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 trialnadia
4,386 Pointscss img fill permanent element
Can someone help me further?
2 Answers
karson Adam
32,623 Pointsset max width for all img to 100%
img {
max-width : 100%;
}
sizwengubane
15,244 PointsHello :) Most images are large in size and most of the time we want these images to be responsive. By being responsive...i mean that the images should be resized along with the browser's size. If these images are not responsive there would be hell of alot trouble for the people viewing that website in a mobile phone. He/She will have to scroll so much to view the whole image. To make the images responsive...we set the 'maxwidth' to '100%'
img {
max-width: 100%;
}
Mark my answer as the best if i managed to help u
nadia
4,386 PointsThanks for taking time to explain it! :)
nadia
4,386 Pointsnadia
4,386 PointsThank you!