I have more than 3 child nodes and a single parent div. I want to align the div
like a bricks. But the div is not positioning properly. The child's consuming unwanted space at bottom in between two div's.
Each child div
have different heights, so display: flex
property is not effective in the parent. Also tried with column-count
property in the parent div and it's not working properly in chrome.
See the Demo
.container {
border: 1px black solid;
overflow: hidden;
vertical-align: top;
}
.small {
float: left;
width: 100px;
border: 1px black solid;
background: aliceblue;
}
<div class="container">
<div class="small">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry.</div>
<div class="small">It has survived not only five centuries.</div>
<div class="small">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</div>
<div class="small">more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum</div>
<div class="small">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical.</div>
<div class="small">Latin literature from 45 BC, making it over 2000 years old.</div>
<div class="small">The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested.</div>
</div>