I am studying flexbox, and just learned that flex item has a default setting of "flex: 0 1 auto". So I made a simple example to understand how this looks when implemented.
But when I shrink my browser, flex items don't shrink and it just overflows.
I thought flex-shrink is set to 1 even if I didn't specify flex property. What am I doing wrong here?
Thanks in advance!
.container {
background-color: yellow;
height: 200px;
display: flex;
}
.child1 {
background-color: white;
margin: 10px;
}
.child2 {
background-color: white;
margin: 10px;
}
<div class="container">
<div class="child1">11111111111111111</div>
<div class="child2">2222222222222222222</div>
</div>