1

I'd like to have two items in same flex container with different behavior. The first item should stretch himself as well as container height while adding content.

But the second should fit container's height, and when exceeding the scroll bar should appear.

Is it possible with flexbox ?

And are there any method that item in container will stretch own height, exceeding height of container, crossing container's borders?

<div style="display: flex; background: #f1f1f1; min-height: 100vh">
  <div style="width:50%; margin:10px;background: aliceblue">
    1<br>1<br>1<br>1<br>... this should stretch itself and container
  </div>
  <div style="width:50%; margin:10px;background: antiquewhite">
    2<br>2<br>2<br>2<br>... this should be scrollable
  </div>
</div>
tacoshy
  • 10,642
  • 5
  • 17
  • 34
Anton Ovsyannikov
  • 1,010
  • 1
  • 12
  • 30

0 Answers0