Currently I have these divs using MDB
<div class="row" style="margin-top: 8em;">
<div class="col-md-6">
<div class="rounded-rectangle-svs card current-proj">
<h5 class="text-default"><b>Project 1</b></h5>
<div class="row" style="overflow-x:auto;">
<div class="col-md-8">
<p class="">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
</div>
<div class="col-md-4 text-center">
<h1 class="text-default"><b>86%</b></h1>
</div>
</div>
</div>
<div class="rounded-rectangle-svs card current-proj">
<h5 class="text-primary"><b>Project 2</b></h5>
<div class="row" style="overflow-x:auto;">
<div class="col-md-8">
<p class="">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
</div>
<div class="col-md-4 text-center">
<h1 class="text-primary"><b>86%</b></h1>
</div>
</div>
</div>
<div class="rounded-rectangle-svs card current-proj">
<h5 class="text-secondary"><b>Project 3</b></h5>
<div class="row" style="overflow-x:auto;">
<div class="col-md-8">
<p class="">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
</div>
<div class="col-md-4 text-center">
<h1 class="text-secondary"><b>86%</b></h1>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="rounded-rectangle-svs card current-proj">
<h5 class="text-success"><b>Project 4</b></h5>
<div class="row" style="overflow-x:auto;">
<div class="col-md-8">
<p class="">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
</div>
<div class="col-md-4 text-center">
<h1 class="text-success"><b>86%</b></h1>
</div>
</div>
</div>
<div class="rounded-rectangle-svs card current-proj">
<h5 class="text-danger"><b>Project 5</b></h5>
<div class="row" style="overflow-x:auto;">
<div class="col-md-8">
<p class="">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
</div>
<div class="col-md-4 text-center">
<h1 class="text-danger"><b>86%</b></h1>
</div>
</div>
</div>
<div class="rounded-rectangle-svs card current-proj">
<h5 class="text-warning"><b>Project 6</b></h5>
<div class="row" style="overflow-x:auto;">
<div class="col-md-8">
<p class="">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
</div>
<div class="col-md-4 text-center">
<h1 class="text-warning"><b>86%</b></h1>
</div>
</div>
</div>
</div>
</div>
and the output of these divs is like this
As you can see the 2 different div with the class name of col-md-6
is inside the row
div.
for each col-md-6
contains 3 different projects.
What I'm trying to do, is it possbile to arrange these divs of projects without using col-md-6? with just JavaScript
? with the arrangement like that too?
Because those project will be coming from my database it's a bad idea to use col-md-6
for this situation that's why I'm trying to do the automatic arrangement of divs with two(2) columns like that even if I loaded multiple divs. It will rearrange just like that
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…