Context:
I have a floated set of navs as part of a web app. Multiple navs sit next
to each other, within a container which is sitting between a sidebar and the content. Floats are used to achieve this. The navs inside the nav container use overflow:auto
and height:calc(100vh)
so that they are always full height and become scrollable if content tries to escape below 'the fold'.
Works in: Firefox, Chrome
Breaks in: IE11, IE10, IE9 (not supporting IE <= 8)
Problem: If the page loads without the scrollbar on the first nav, then all is fine, but if a scrollbar is needed the float breaks and the second nav falls underneath, but only until the window is resized. Strangely the browser does, however, block elements from filling the space where the stacked nav should be.
My setup has been simplified in this jsFiddle. Try resizing the viewport of the output and refreshing to see the different behaviour mentioned above.
I should note that the navs are of dynamic width as the contents are dynamic and could vary in width. I would also like to avoid using JavaScript to control visuals so a pure CSS/HTMl markup solution is what I'm really after here.