Appendix HNotes on theory
On possible orderings
Since the Any Order technique does not rely on wrapping elements, the blocks can be arranged in all possible combinations. For n columns, since any block can be in the position of any column, that number is given by the simple formula n factorial or n!
eg. for n = 5, the possible orderings = 1 x 2 x 3 x 4 x 5 = 120
With the wrapping elements (as in the original Source Ordered Columns), things are more constrained. For each wrapping element we essentially end up with two sub columns - two sub-columns means two possible combinations, giving us the formula, 2n-1.
eg. for n = 5, the possible orderings = 2 x 2 x 2 x 2 = 16
As you can see, as the number of columns increases, the potential number of combinations increases far more rapidly for the Any Order technique.
More practically, wrapping elements can be used to good effect to enable groups of blocks to be stacked vertically within, rather than as, columns, giving yet more potential layout flexibility.
| Number of Columns | Source Order Columns | Any Order Columns |
|---|---|---|
| 2 | 2 | 2 |
| 3 | 4 | 6 |
| 4 | 8 | 24 |
| 5 | 16 | 120 |
| 6 | 32 | 720 |
| 7 | 64 | 5040 |
| 8 | 128 | 40320 |
On faux columns and wrappers
Until enough browsers support multiple backgrounds on a single element, n-2 wrapping elements are required to hold the necessary background images to create the effect of n columns.
Unless, of course, the layout is a fixed pixel-width one, in which case a single background image can be used for any number of columns.