I have trouble with understanding how CSS grid rows work. Why columns expand from left to right and rows don't?
.grid {
position: absolute;
height: 50vh;
width: 30vw;
border: 1px solid black;
top: calc(50% - 30vh);
left: calc(50% - 15vw);
}
.keys {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(4, 1fr);
}
.keys>button {
font-size: 30px;
text-align: center;
line-height: 30px;
border: 1px solid black;
}
<div class="grid">
<div class="keys">
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
<button>1</button>
</div>
</div>
I would want those buttons to go all the way down without giving them specific height etc.
How to achieve that easily ?