▪️▪️
▪️▪️
CSS Grid is a two-dimensional layout system created specifically to tackle grid-based user interfaces on the web.
- Codrops
▪️▪️
▪️▪️
.wannabe-grid {
display: table;
}
.wannabe-grid-children {
display: table-cell;
}
.wannabe-v2-grid {
float: left;
width: 33.33333%;
}
▪️▪️
▪️▪️
By setting (at least) these properties to the container
.grid-container {
display: grid;
grid-template-columns: 200px 200px 200px;
grid-template-rows: 50px 50px;
}
▪️▪️
▪️▪️
Sets the number of rows and columns
grid-template-columns, grid-template-rows
▪️▪️
▪️▪️
▪️▪️
▪️▪️
.grid-container {
display: grid;
}
Inspector recognizes the grid
▪️▪️
▪️▪️
Example on the next slide 👉
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
.item {
grid-column: 4 / 5;
/* grid-column-start grid-column-end */
grid-row: 2 / 3;
/* grid-row-start grid-row-end */
}
▪️▪️
▪️▪️
Example on the next slide 👉
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
👩💻
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️
▪️▪️