I need to nest two flexboxes like this:
First one has two items: a button and a div, the div filling remaining space.
The div is also a flexbox with 3 items: 2 buttons (a left and a right) and a middle div which is scrollable
https://jsfiddle.net/mLtwmc62/
.flex-container
{
display: flex;
}
.flex-item-auto
{
flex: 0 0 auto; /* grow shrink basis */
}
.flex-item-fill
{
flex: 1 1 auto;
}
.middle
{
overflow-x: scroll;
}
.big
{
width: 1000px;
height: 20px;
background-color: green;
}
<div class="flex-container">
<button class="flex-item-auto">View All</button>
<div class="flex-item-fill flex-container">
<div class="flex-item-auto">Prev</div>
<div class="middle flex-item-fill">
<div class="big"></div>
</div>
<div class="flex-item-auto">Next</div>
</div>
</div>
On IE11, it works as expected, I can see the right button and I can scroll the div.
But not on latest Chrome and Firefox, here the whole page is scrollable, not just the div.
I also need to make it work on mobile (Safari 8, Android 4.3+)