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
Voyti 1
1,854 PointsWhy "max-width" property is affecting orange background, but not the images?
In this video https://teamtreehouse.com/library/how-to-make-a-website/css-cascading-style-sheets/center-the-wrapper you can see that the orange background has 940 pixels width, but the image (number 12) is wider than that. Why the background image is affected by the max-width property and the images are not, although there are both in the same div section? What are the elements that are affected by the width property?
2 Answers
Tomasz Halaczkiewicz
21,845 Pointswhat's the video you're refering to ?
Tomasz Halaczkiewicz
21,845 PointsIf you don't set any css properties to an image you get an original size no matter what
Voyti 1
1,854 PointsVoyti 1
1,854 Pointshttps://teamtreehouse.com/library/how-to-make-a-website/css-cascading-style-sheets/center-the-wrapper
It's in 3.18 minute