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 trialMatthew Keys
1,922 PointsHelp with "max-width: 100%" for img.
I am confused by the img {max-width: 100%"}. I do not understand what it means. Does it make it so that the size cannot go above 100% of its original size or what?
2 Answers
Ella Ruokokoski
20,881 Pointswhen you set the img max-width to be 100%, the maximum width of the img element is 100% of its parent element's width. This also means the image will scale eg. be responsive when the window is resized.
Sandra Norris
3,895 PointsI think it is well explained here https://www.impressivewebs.com/width-100-percent-css/ if you would like to see.