Grid on the viewport
Hi everyone
I built a grid I which all the grid should appear on the viewport but I have a vertical scrollbar
my code:
my css code:
can I get some idea about the way to solve this problem
(Sorry for my english I'm from french country)
this is what I want build:
![](https://utfs.io/f/0a1004e4-0c82-4e4b-8647-6dc34763d17f-1g.jpg)
6 Replies
what I have:
![](https://utfs.io/f/257283db-15df-4b43-81f2-c33597db89e1-2jk.jpg)
![](https://utfs.io/f/061e9c3a-4a7e-434f-a883-ec46148f855c-2i3.jpg)
If you are defining the height of each box in pixels, inevitably there is a chance that they will cause the container to be taller than the screen.
If you give your container a aspect-ratio of 8/6 (rather than being the full viewport size) and remove the fixed width and height on your boxes, the grid should be able to make them all the same size and fit within your container.
do not use fixed width or heights https://codepen.io/MannixMD/pen/RweJOzr
let the browser do all the calculations for the grid