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:
6 Replies
what I have:
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