Giving flex a value solved the problem for me, e.g.
flex: 1 0 auto
More Related Contents:
- Flex / Grid layouts not working on button or fieldset elements
- Height of flex container not working properly in Safari
- Flexbox: center horizontally and vertically
- CSS-only masonry layout
- Make container shrink-to-fit child elements as they wrap
- When flexbox items wrap in column mode, container does not grow its width
- One flex/grid item sets the size limit for siblings
- Why are flex items not wrapping?
- Make grid container fill columns not rows
- Centered elements inside a flex container are growing and overflowing beyond top [duplicate]
- Align an element to bottom with flexbox
- Make background color extend into overflow area
- Center text over an image in flexbox
- Force flex item to span full row width
- Why can’t be flex containers?
- Prevent flex items from rendering side to side
- Flexbox and Internet Explorer 11 (display:flex in ?)
- ‘position: sticky’ not working when ‘height’ is defined
- Flexbox column-reverse in Firefox, Edge and IE
- Text not centered with justify-content: center
- Flexbox affects overflow-wrap behavior
- How to stretch flex child to fill height of the container?
- How to align flexbox columns left and right?
- Prevent a child element from overflowing its parent in flexbox [duplicate]
- Why isn’t position:sticky with left:0 working inside a scrollable container?
- Chrome does not expand flex parent according to children’s content [duplicate]
- CSS object-fit: contain; is keeping original image width in layout
- Flexbox on IE11: image stretched for no reason?
- extra space when centering elements using flexbox
- Height is not correct in flexbox items in Chrome [duplicate]