I am using flex for styling and having an issue with the width of children elements. In my JS Fiddle example, if you look at "Flexible Cancellation" pill badge ... there is a lot of empty space on the right side. How can I update the flex styles so that the width of the pill-badge does not have this extra blank space? It seems that the width of this child element is extending to the entire width of its parent...
JS Fiddle: https://jsfiddle.net/a76bdLvp/1/
Code Areas of Focus (from JS Fiddle):
.left-column {
padding: 12px 12px 12px 16px;
display: flex;
align-items: flex-start;
flex-direction: column;
-webkit-box-flex: 1;
flex: 1 1 0px;
}
.pill-badge {
margin-bottom: 4px;
display: flex;
align-items: flex-start;
flex-direction: column;
}
Current Result
Desired Result
I reviewed this example, which seems very similar ... but applying this solution (or inline-flex to child) did not work. I'd really appreciate your help!
Make flex items take content width, not width of parent container