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

CSS How to Make a Website Customizing Colors and Fonts Organize CSS with Comments

Joseph Longo
Joseph Longo
1,074 Points

Why 940px?

I am curious why we set the max-width of the wrapper ID to 940 px. Is this a general number to use? What determines the max-width? For instance, say I am making a website with the dimensions 1024 x 768 px or larger, what should I set the max-width to? What if I design a site smaller than that, such as 800 x 600 px? I like to understand the ins and outs of something, so I am trying to think of different situations when this value would vary.

Thanks,

Joe

1 Answer

geoffrey
geoffrey
28,736 Points

940 or 960 px has become a "standard", because for a long time It was unusual to see screens larger than 1024x768px. Thus 940px or 960px, was a good choice to put our content. It allows whitespaces either side and it gets divided nicely into columns if needed.

If ever you want to make a website with a container larger than 960px, so let's say a max-width of 1024px, you can, It's a matter of choice, but that wouldn't be a bad idea to set the max-width of the container to 960 if the screen is smaller than 1280px for exemple. You can accomplish that with media queries.

In fact nowadays, as you most of time need responsive website, you'll use media queries... It's explained here in Treehouse, you'll see, It's not that much difficult, you adapt the CSS of your website, according the viewport width of the device.

Joseph Longo
Joseph Longo
1,074 Points

Thank you!! I appreciate that a lot. I am thoroughly enjoying this course from Treehouse. I have designed a few sites myself in the past using PHP and Photoshop tutorials. Although PHP is a server-side scripting language, it is nice to learn the fundamentals, which I've never really done. I've used CSS before but it was more or less a copy and paste job. After I complete this track, I am going to do the PHP track. I have an idea for a site I want to make in PHP, so revisiting the fundamentals is nice.