I have a markup like the following:
<div id="red">
<div id="yellow">
alot of text
</div>
</div>
<div id="blue">
</div>
I can't get yellow to take 100% of red's height, it only takes 100% of the window even if red is overflowing. It works if I set red's display
to block
, but I need flex...
#red {
position: fixed;
height: 100%;
overflow-y: scroll;
width: 100px;
background-color: red;
display: flex;
flex-direction: column;
align-items: stretch;
align-content: stretch;
}
#yellow {
display: flex;
flex-grow: 1;
background-color: yellow;
}
#blue {
background-color: blue;
}