I have a horizontal list of items, arranged with display:table-cell.
The middle item can vary in content length, and it should expand accordingly. And obviously its siblings should shrink to make space to it.
Here is a sample of what I did until now:
http://codepen.io/Pictor13/pen/mJoyXw
But the middle item still overflows over the right sibling, when the content grows.
Is it possible to achieve what I want? Are display: table-cell
and white-space: nowrap
the right approach?
Note: the width, if specified, should always be generic and not fixed to a specific px/em.
Wellll....
flexbox
can do that.Codepen Demo