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 CSS Grid Layout Flexible Sized Grids Repeat Tracks with auto-fill and auto-fit

Auto-fit & auto-fill actually make your programming harder?

When it comes to having an alternative use to media queries, making your life much easier in a way actually becomes more difficult?

I see how useful this can get when working with information that can be displayed to the user according his/her screen size. Although, my concern comes when using auto-fit & auto-fill if your client is working on a computer.

Since auto-fit & auto-fill always leave a gap, it would be bad because the information displayed on the page will be placed incorrectly no? Is there a way (using grid display) to set a predetermined size for a computer screen where, (if the client's screen size is a smartphone) It will fix the site using auto-fit & auto-fill, but when the client accessed the site on a computer the program will set it's predetermined size?

1 Answer

Steven Parker
Steven Parker
231,236 Points

With media queries, you can have auto-fit/auto-fill at one screen size, but a different layout strategy at another size.