Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Unsubscribed User
4,479 PointsWhy does the #wrapper not flex to the larger size of the contained images?
Why does the #wrapper, with a max-width: 940px; not flex to the larger size of the contained images that have a width of 1024px?
As the images inside #wrapper are bigger than this containing div I thought either the #wrapper might flex to the larger size or the images might be reduced to the smaller size.
2 Answers

Steven Parker
216,148 Points
The images are overflow-ing the wrapper.
If you want to cut off the part of the image that extends beyond the wrapper, you can set "overflow: hidden
" on the wrapper.
If you'd rather have the image shrink to fit inside the wrapper, you can set "width: 100%
" (or "max-width: 100%
") on the image.

Unsubscribed User
4,479 PointsThanks Steven.
I just wanted to know the mechanics of it and you've explained that. Your tweaks really help too.
budoor ayhd
1,471 Pointsbudoor ayhd
1,471 PointsThank you so much :)