The following example would create a 4 columns layout on xl, 3 on lg, 2 on sm en default 1 column:
<div class="row">
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">A</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">B</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">C</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">D</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">E</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">F</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">G</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">H</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">I</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">J</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">K</div>
<div class="col-12 col-sm-6 col-lg-4 col-xl-3">L</div>
</div>
This works fine, but my data is shown alphabetically from left to right:
ABCD
EFGH
IJKL
But I'd like ABC to be in the first colum, DEF in the second, GHI in the third, and JKL in the fourth... in other words alphabetically from top to bottom spread out across the columns depending on the screen:
ADGJ
BEHK
CFIL
AEI
BFJ
CGK
DHL
AG
BH
CI
DJ
EL
FL
A
B
C
D
E
F
G
H
I
J
K
L
My first though was looping through the data and create "row" for each screensize and use the display method to show it on the corresponding screen, but there has to be a better way?