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

General Discussion

Content inside wrapper going all over the place when i zoom out of webpage

I am creating a portfolio for myself and I have all of my content inside a wrapper div. However everytime I zoom out of page all of my content seems to go all over the place and its not remaining inside the wrapper. Could someone please help.

CSS for wrapper

.wrapper { margin:auto; width: 100% }

3 Answers

I think with that code, you're wrapper will expand continuously with the width of the browser. Stuff inside will 'lose their shape'

What you can do is add a max-width to stop things from falling out of place. 1200px is a good starting point to play with

max-width: 1200px;

Set the wrapper to a fixed width of 960px. That way the content will be nice aligned in the center of the page. That's what a wrapper is for. 100% width on it doesn't make sense, to be honest.

I think if you set a fixed width, the wrapper won't be responsive to screen size. If this is the desired functionality, you'll need a 100% width + max width.

Agreed, but that depends on what she is trying to reach.