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 trialolajide joshua
Courses Plus Student 83 Pointsgrid positioning
Assuming i used a 4 grid column, how can i position it using media queries to make it display 2 by 2 columns on a tablet screen size
2 Answers
Mister Moody
48,333 PointsTry this:
.grid {
display: grid;
grid-template-column: repeat(2, 1fr);
grid-template-rows: minmax(75px, 1fr); /* or try 'auto' */
}
@media screen (min-width: 1000px) {
.grid {
display: grid;
grid-template-column: repeat(4, 1fr);
grid-template-rows: minmax(100px, 1fr);
}
}
Kevin Gates
15,053 PointsI haven't taken the course but this may get you started: https://thoughtbot.com/blog/concise-media-queries-with-css-grid
olajide joshua
Courses Plus Student 83 PointsThanks bro.......... I will check the link out