I am currently struggling to get a CSS grid to work with some media queries for smaller screen size. I essentially have a grid with two rows and 3 columns which goes down to 3 rows with two columns at smaller screen sizes. I want this to then go down to a grid with 6 rows and one main column at a phone size screen. Here is my code so far:
@media (max-width: 549px) {
.projects-container {
grid-template-columns: 200px;
grid-template-rows: 200px 200px 200px 200px 200px 200px;
justify-items: center;
align-items: center;
}
.project-tile {
justify-self: center;
align-self: center;
}
}
This is working for the most part. However, for some odd reason the boxes aren't centered at the smaller screen size despite my crude efforts seen above. Here is the full code pen to illustrate my problem: https://codepen.io/hudsontay/pen/WNGdwpw?editors=1100
The specific issue is under the "Work" section of the portfolio.