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

HTML How to Make a Website CSS: Cascading Style Sheets Center the Wrapper

Why do pictures hang over and outside a Wrapper with a max-width?

In How To Make a Website, chapter 4: 'Centre the Wrapper', the Wrapper has a max-width of 940px but the pictures contained in the Wrapper hang over and outside the wrapper.

Is this meant to happen? I thought that the Wrapper by default would be stretched to the outside width of the pictures contained within it.

EDIT:

Although I've checked out the Markdown Cheatsheet I'm not having much luck attaching a screen shot showing what I want to question. Any suggestions? (I've uploaded the screen shot to my only workspace)

Thanks.

screen shot

2 Answers

if the wrapper has a maximum width of 940px then any image or picture larger than that will hang over or outside the wrapper.

Thanks Kevin.

If the wrapper did not use the max-width property and only used a width property of 940px would the pictures with a greater width force the width of that containing wrapper?