I am working at my second project and I want to use the CSS Grid but that doesn’t work. I want that the 3 areas are at one row, when there is not enough space put them in extra rows. my link
-
You didn’t close the
item2
div correctly. -
You have an invalid value for the grid-template-areas.
-
You can use an “auto grid”, you do not need
grid-template-areas
.
main {
display: grid;
grid-gap: 5%;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
justify-items: center;
}
2 Likes