console
<div style="width: 700px; height: 400px; background: red; position:absolute">
<div class="grid-container">
<div>
<div>123123</div>
</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
</div>
</div>
.grid-container{
padding-bottom: 100%;
display: grid;
grid-template-columns: repeat(auto-fill, 33%);
grid-template-rows: repeat(auto-fill, 33%);
background: #d4d4d4;
}
.grid-container > div {
border: 1px grey solid;
padding-bottom: 100%;
}
html,body{
height: 100%;
width: 100%;
}