Skip to content Skip to sidebar Skip to footer

How To Make A Flexbox Container To Scroll?

I have a vertical flexbox container on which I set a specific height and set it to scroll vertically when overflows. The problem is that the flex container won't scroll if its cont

Solution 1:

Try, set a flex-basis value, and make it to not grow or shrink:

.item1, .item2, .item3 {
  flex: 00200px;
}

Or, flex: 1 0 200px; if you do need them to grow as needed.

jsFiddle

Solution 2:

You can always provide min-height and flex will respect that. See the updated Plunkr

http://plnkr.co/edit/7rgo7BpWWtXsQqYbJvdU?p=preview

Post a Comment for "How To Make A Flexbox Container To Scroll?"