CSS Grid doesn't work

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

Try this:

grid-template-columns: 1fr 200px;

Check out this mdn website about grid.

  1. You didn’t close the item2 div correctly.

  2. You have an invalid value for the grid-template-areas.

  3. 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