Grid element overflowing on small screens

Hey everyone,

I am having an issue with my css grid. I have set the minimum height and width of the grid with VH and VW units, but on a small screen the scrollbar appears. I want the grid to fit in any size screen and never produce the scrollbars. Any help would be appreciated.

  display: grid;
  max-height: 84vh;
  max-width: 84vw;
  margin: 0 auto;
  padding: 0;
  grid-gap: 10px;
  grid-template-columns: 7vw 7vw 7vw 7vw 7vw 7vw 7vw 7vw 7vw 7vw 7vw 7vw ;
  grid-template-rows: 14vh 14vh 14vh 14vh 14vh 14vh;

Here is the repo

Here is the heroku

Turns out I had to make the Body display flex as well. I am now facing a different issue: Even though the body has

display: flex;

it is still putting the App component as touching the top of the screen.

Try giving body height of 100vh.

1 Like

Mate you have solved it, ty!