It is now like this:
I want like this:
my css:
.maindiv{
width:410px;
}
.innerdiv{
display: inline-block;
width: 200px;
height: auto;
}
this is an example page
It is now like this:
I want like this:
my css:
.maindiv{
width:410px;
}
.innerdiv{
display: inline-block;
width: 200px;
height: auto;
}
this is an example page
Here's an easy implementation ,just use display:flex on main div and make two columns div to wrap inner div
<div class="maindiv">
<div class="col-1">
<div class="innerdiv">
<img style="width: 100%; height: 200px;"/>
</div>
<div class="innerdiv">
<img style="width: 100%; height: 120px;"/>
</div>
<div class="innerdiv">
<img style="width: 100%; height: 220px;"/>
</div>
</div>
<div class="col-1">
<div class="innerdiv">
<img style="width: 100%; height: 260px;"/>
</div>
<div class="innerdiv">
<img style="width: 100%; height: 180px;"/>
</div>
</div>
</div>
css
.maindiv {
width: 410px;
display: flex;
}
Result