Hi,
I have divided my div in 3 parts. Header part, content part and footer part.
the CSS looks like that:
html:
<div class = "parent">
<div class = "header"></div>
<div class = "content">
<div class = "whatever"></div>
</div>
<div class = "footer"></div>
</div>
.parent
{
display: grid;
grid-template-columns: 100%;
grid-template-rows: 3rem auto 3rem;
position relative;
}
.header
{
grid-column: 1;
grid-row: 1;
}
.content
{
grid-column: 1;
grid-row: 2;
}
.footer
{
grid-column: 1;
grid-row: 3;
}
I need to define the class whatever that way, that is has the height of the content div. Is this possible with CSS or do I need to calculate the height in Javascript?