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

Joseph Torres
Joseph Torres
6,282 Points

Max-width or with using 100% or 1200px using CSS Grid

Hello all, I just was just needing a little assistance on trying to figure out the best practice for the width of the container. I've seen people still use max-width or with using pixels and percentage even when using a grid. I just need the best practices for this to continue.

Also I wanted to know if one uses CSS Grid, does one still use positioning and floats and all of the old school css syntax? Thank you so much.

1 Answer

Steven Parker
Steven Parker
231,110 Points

While you can use them together, I would think that one advantage of grid layout is that you can usually do anything you need using it alone for arranging the contents.

The size of the grid itself would still be set by properties such as "max-width", and percentage dimensions might be used to make the entire grid responsive.

Joseph Torres
Joseph Torres
6,282 Points

Hello Steven, what would be a good max-width value that is typically used these days.

Steven Parker
Steven Parker
231,110 Points

It really depends on your design. And while I'm not sure how "typical" it might be, a familiar example would be right here on the forum, where 1260px is used for the outer container and 940px for the inner question container.