https://jsfiddle.net/dm05xe9y/
I want to understand why the div wasn't able to wrap around the inline-block elements (buttons in this case).
html
<div class="flex">
<div class="first">First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First First Firsta</div>
<div class="wrap">
<button>Hello</button>
<button>Hey</button>
</div>
</div>
css
.flex {
display: flex;
}
.first {
margin-right: auto;
}
.wrap {
background: #833;
}
EDIT: you need to max size the browser portion to see the red spacing on the right.