For a flex item to scroll, a height is needed, or else it will just grow with its content.
So to overcome that, you solve it like this, where you set the inner element to position: absolute
.
.wrap {
display: flex;
}
.left {
flex: 1;
border: 1px solid gray;
}
.right {
flex: 1;
border: 1px solid gray;
position: relative;
}
.text {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
overflow: auto;
}
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla
Bla bla