How to define max width of flex grow container
I right now have a flex grow child container with some overflow in a parent container with display flex. The overflowing container also has a sibling with a set size, and so the size of the overflowing container is not set but defined with flex grow. Though when i do this the container seems to completely ignore the parents height and width constraints. I've recreated it in js fiddle like so: https://jsfiddle.net/5kjoqdzy/32/
Edit fiddle - JSFiddle - Code Playground
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
2 Replies
1、Understand flex-grow and flex-shrink.
2、Understand the meaning of the flex shorthand.
see:
https://developer.mozilla.org/en-US/docs/Web/CSS/flex#constituent_properties
MDN Web Docs
flex - CSS: Cascading Style Sheets | MDN
The flex CSS shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container.
Just implimented the changes. Thank you