I have a calendar layout using the following css-grid styles:
.calendar {
display: grid;
grid-template-columns: repeat(7, 1fr);
grid-template-rows: 1.5em 1.5em repeat(6, 1fr);
width: 100%;
height: 100%;
}
(Codepen https://codepen.io/joelhoward0/pen/vJLmWK )
The first two lines are the headings "controls" and the days of the weekly headers, followed by divs for each day of the month:
<div class="day">
<div class="header">26</div>
<div class="content"></div>
</div>
Every day has a div .headerand .content. I want the div to .headeroccupy 1/5 of the height of the line, and the content to occupy 4/5 and scroll if the content overflows.
However, any combination of styles that I tried leads to an increase .content, reduction of other grid lines to compensate. I assume that this is due to the use of a 1frcontainer in the grid-template-container.
4/5 , 1/6 , .content div?
( : overflow-y: auto; .day , , . overflow-y: auto; .content, , -.)