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 trialkirkls
7,955 Pointsminmax isn't working for me
Using this rule:
.grid {
max-width: 1000px;
display: grid;
grid-template-columns: minmax(200px, 300px) 1fr 1fr;
grid-template-rows: 100px 200px;
grid-gap: 15px;
}
The first column in my grid isn't resizing at it shows in the video. The 2nd and 3rd columns do. But the first column remains at the max of 300px when reducing the size of the browser window.
2 Answers
Steven Parker
231,269 PointsIf you're using Chrome, the minimum window width is 500px, which is enough for a 300px first column plus the 2 other minimized columns.
I think the video is made using Safari, which has a smaller window minimum of 400px.
To make the demo usable on Chrome, try using a setting like minmax(400px, 600px)
instead. Or set minimums on the other columns such as:
grid-template-columns: minmax(200px,300px) minmax(150px, 1fr) minmax(150px, 1fr);
kirkls
7,955 PointsSteven,
Thank you so much for that information! I went character by character, sure I'd made a typo somewhere. :D I appreciate you taking the time to explain.
--Kirk