Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Build a Responsive Website Creating a Fluid Foundation Converting Pixels to Percentages

Paul Barron
Paul Barron
6,595 Points

100% Grid

If I want to make a full page grid would I just put .container {max-width: 100%} ?

Sreng Hong
Sreng Hong
15,083 Points

I think max-width property is to set the maximum width of something, if you want the full page grid i think you should put width 100%. Correct me if i'm wrong.

Sreng Hong
Sreng Hong
15,083 Points

I think maybe you're right, and I'm wrong!!!

2 Answers

Isaac Asante
Isaac Asante
4,752 Points

Just use width: 100%; because in this scenario, you want to make a full-page grid, which will fill the page on any device or any screen. So you don't need max-width, because in no case do you want the width to be reduced based on any condition. It's useless to set a maximum value or minimum for the width. What you want is for the grid to cover absolutely the full page at all times. So just set the width.

use width: 100%, max-width can be useful too but is declared when building responsive websites and in this case not necessary.