I am relatively new to using CSS Grid. I've made a 12 column grid but i noticed when i view the grid in mobile it does not adapt to the mobile browser. My question is how can i make my grid responsive for mobile and tablet devices?
link to my code can be found here
.container > div {
display: flex;
justify-content: center;
align-items: center;
font-size: 2em;
color: #ffeead;
}
html, body {
box-sizing: border-box;
background-color: #ffeead;
height: 100%;
padding: 10px;
margin: 0px;
font-family: arial;
}
.container > div:nth-child(1n) {
background-color: #96ceb4;
}
.container > div:nth-child(2n) {
background-color: #ff6f69;
}
.container > div:nth-child(3n) {
background-color: #88d8b0;
}
.container > div:nth-child(4n) {
background-color: orangered
}
.container > div:nth-child(5n) {
background-color: #ffcc5c;
}
.container {
height: 100%;
display: grid;
grid-gap: 3px;
grid-template-columns: repeat(12, 1fr);
grid-template-rows: 40px auto 40px;
}
.header {
grid-column: 1 / -1;
}
.menu {
grid-column: 1/ 3
}
.content {
grid-column: 3 / 8;
}
.content1 {
grid-column: 8/-1
}
.footer {
grid-column: 1 / -1;
}