I'm stuck in this scenario:
I'm trying to design this structure:
I have a wrap with 100% width and variable height. This wrap is a flexbox with these settings:
.wrap {
width:100%;
display:flex;
flex-direction:row;
justify-content:space-between;
align-items:stretch;
background:black;
}
Inside this wrap I have two boxes (left and right). Like this:
.left {
width:250px;
display:flex;
flex-direction:column;
justify-content:space-between;
background:yellow;
}
.right {
width:calc(100% - 260px);
display:flex;
background: blue;
}
.right img {max-width:100%;}
Inside the .left box I have two other boxes with variable heights. Like this:
.left-one {
width:100%;
height:100%;
background:green;
margin-bottom:10px;
overflow:auto;
}
.left-two {
width:100%;
background:red;
}
.left-two img {max-width:100%;}
Everything seems to work.. But...
Inside the .right div I'll have a random image that will make the .wrap height grows. Ok.
And inside the .left-two I'll have another image with unknown dimensions that will make it grow!
This is working. OK. The problem is:
The .left-one div will have dynamic content with unknown height too (text). And I'm trying .left-one div fill all the avaiable space (discounting .left-two height after recieve image) and overflow the surplus text.
And this is not working!
Here is a fiddle without the text inside left-one div: https://jsfiddle.net/bson25c1/7/
And here is a fiddle with the text that should be hidden by scrollbar: https://jsfiddle.net/bson25c1/9/