My current dilemma involves a collection of divs that must be displayed in a specific order, but with a rather intricate layout. Essentially, this is the structure of my HTML:
<div>
<div class="box">1 (first in list)</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
<div class="box">5</div>
<div class="box">6</div>
<div class="box">7</div>
<div class="box">8</div>
<div class="box">9 (last in list)</div>
</div>
The desired layout for these div
s is to arrange them in rows of 4 from left to right, stacked from bottom to top within each row, like so:
9
5 6 7 8
1 2 3 4
I have included a fiddle showcasing the desired result: http://jsfiddle.net/mpcjs/ - However, I am seeking a solution that does not involve reordering the div
s in the HTML. Additionally, please note that the number of div
s may vary.
Is it feasible to achieve this? I am open to CSS3/jQuery solutions!