Assuming I have a nest structure like this:
<div>
<div></div>
<div></div>
<div></div>
...
</div>
Can a dynamic horizontal layout be achieved using just CSS?
In essence, the screen can only accommodate 2 vertical contents.
For instance, the screen can fit 3 vertical contents.
The body will display a horizontal scrollbar fixed at the bottom. When there is more content off-screen, it should flow left and move into a new column when the vertical space is filled. Any excess content should flow as indicated by the arrow.
Both screens must not show a vertical scrollbar. Is this possible without the need for JavaScript? I attempted using display: flex
, but it did not produce the desired order effect mentioned above.
Please refer to the jsFiddle link: http://jsfiddle.net/W7z4s/10/ (Note that I want the .outer div to fill the body and show the scrollbar at the bottom)
It is imperative that this layout is supported on both Firefox and Chrome browsers!