I have a grid of boxes that I want to display some content on. However, I would also like for all of them to be the same size (scaled according to window size).
I have the following code:
.grid-container {
display: grid;
grid-template-columns: auto auto auto;
padding: 10px;
}
.grid-block {
border: 1px solid;
padding: 16% 0 16%;
margin: 20px;
text-align: center;
}
<div class="grid-container">
<div class="grid-block">1</div>
<div class="grid-block">2</div>
<div class="grid-block">3</div>
<div class="grid-block">4</div>
<div class="grid-block">5</div>
<div class="grid-block">6</div>
<div class="grid-block">7</div>
<div class="grid-block">8</div>
<div class="grid-block">9</div>
</div>
Here, if I replace any of the numbers in my "grid-block" divs with some text, the whole box and all boxes along the same column get resized.
I would like to force all boxes to be the same size (scaled as the window grows or shrinks).