When I give percentage value to flex-basis, what is that percentage of? The parent container? I defined flex-basis on a few flex-items that would exceed 100%, yet all of my items are displayed correctly. Could someone explain how to think about flex-basis? the codepen i was playing with is at: https://codepen.io/anon/pen/pXWQBN
<div class="container">
<div id="i1" class="items">item1</div>
<div id="i2" class="items">this is item2</div>
<div id="i3" class="items">this is third longest text</div>
<div id="i4" class="items">this is longer than third longest item</div>
<div id="i5" class="items">well, this is the item that contains larges amount of text</div>
</div>
.container {
background: lightsalmon;
width: 98%;
padding: 15px;
height: 200px; /**/
display: flex;
justify-content: space-between;
}
.items {
background: lightyellow;
margin:5px;
}
#i1 {
flex-basis: 100%; /*100% of what?*/
}
#i2 {
flex-basis: 25%; /*25% of what?*/
}
#i3 {
flex-basis: 45%;
}