2

I'm using the latest flexible box spec (currently only supported by the latest Chrome as far as I know) and am trying to stop the flex items from exceeding a maximum height.

Best explained with an example: http://jsbin.com/efedof/2/edit

The first examples .content (plus the two .bar elements) does not exceed the height of 300px, so is correct. But with the second example the text pushes the bottom of .content down, outside of the .box div.

How do I enforce a maximum total height of the three combined flex items, so that the .content area becomes scrollable instead of stretching outside of the .box and pushing the .bar out of the .box?

Thanks.

Jack Sleight
  • 17,010
  • 6
  • 41
  • 55

1 Answers1

5

Found the answer!. Trick is to add min-height: 0; to the .content div.

Community
  • 1
  • 1
Jack Sleight
  • 17,010
  • 6
  • 41
  • 55