I have a container element with a set of display: flex properties. Children have a fixed width ( flex: 0 0 auto ), the other does not ( flex: 1 ). Flexible children have other children: I want this container ( inner ) to dock its children according to the width of the parent.
I managed to do this, but also I would like to get an ellipsis overflow in case the content is cropped (the number of children is not fixed).
This is my code:
.outer { border: 1px solid red; display: flex; width: 400px; } .inner { display: flex; min-width: 0; overflow: hidden; flex: 1; text-overflow: ellipsis; } .child { display: inline-block; white-space: nowrap; flex: 1; border: 1px solid blue; } .btn { border: 1px solid green; flex: 0 0 auto; }
Live here: http://jsbin.com/niheyiwiya/edit?html,css,output
How can I get the next desired result? (hello hello - css just please!)

source share