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
The wrapper has a specified width but the images contained within this div tag, go over the right side. Why?
I don't understand why the images don't conform to the width specified in the wrapper. why does part of the image stick out on the right side?
It's because the wrapper has a fixed width of 940 px and the image is wider. You'll probably see later in the course that to fix it, you just have to assign a max-width property to the images and set the value to 100%. Another possibilty is to set the property overflow and the value hidden on the wrapper itself. However this approach might give an ugly result, as the image is going to be truncated.
Hi Thania, that's pretty much the same issue than the previous time you posted here about that. I checked your code.
What you absolutely need to do in this case, is set this css rule in your stylesheet:
Why ? because as you stated, your #wrapper has a max-width of 940px. This means that if it contains images larger than its owns width, images are going to exceed the #wrapper's width. Which is what you have right now.
So first of all, you need to set the css snippet I gave you above, once done, you'll be able to play again with the padding of your #wrapper. You'll see that the padding will be indeed 5% on the left and right this time.
Hope that helps.