I want to convert a page from having tightly-controlled positioning to grid-template. I am able to display the containers in the right places, but I don't know how to properly set grid-template-rows. grid-properties-not-working-on-elements-inside-grid-container hints at an answer, but I don't think my problem involves grandchildren.
I have two fiddles to demonstrate the problem.
The first is the bad example, where the entire page scrolls. I have tried variations of
grid-template-rows: min-content min-content 90%;
but nothing forces my main container to be the only one that scrolls and resizes, even if I play around with the value in the last row. ("min-content" is fine for the first two rows). Here is the CSS for the main container:
main {
overflow: auto;
}
The second is the good example, where the main container scrolls and resizes properly when the browser window size is altered, but I would think that the positioning I applied overrides any benefit gained from using a grid template. Here is the CSS for the main container:
main {
overflow: auto;
position: fixed;
top: 72px;
bottom: 0px;
left: 200px;
right: 0px;
margin-left: 10px;
}
My question:
How do I define the grid-template-rows property while still isolating just the main container in row 3 column 2?
Follow-up: Is there a general resource for grid-templates that I have overlooked and should be reading? I looked at several of the articles SO suggested when I created my original post, but none seemed to address my particular issue.