I'm trying to arrange items in two columns like Wallapop, but this is the best I've come up with so far:
https://i.sstatic.net/1yBqJ.png
Here is a JSFiddle link where you can edit the code: https://jsfiddle.net/52qdnLcg/
.parent {
background-color: #ccc;
}
.child {
width: 44%;
background-color: #3c434f;
margin: 2%;
display: inline-block;
text-align: center;
color: #fff;
}
<div class="parent">
<div class="child" style="height: 150px;">
1
</div>
<div class="child" style="height: 60px;">
2
</div>
<div class="child" style="height: 40px;">
3
</div>
<div class="child" style="height: 70px;">
4
</div>
<div class="child" style="height: 30px;">
5
</div>
</div>
Any suggestions or help would be greatly appreciated!