I have divs like this:
<div class="parent">
<div class="inner">text</div>
<div class="inner">text</div>
<div class="inner">text</div>
<div class="inner">text</div>
<div class="inner">text</div>
<div class="inner">text</div>
<div class="inner">text</div>
</div>
And I want to align the divs in a 3 column design, like this:
So the height of the divs depend on the content inside.
What I've tried so far
I tried adding the display:inline-block
approach and verticle-align:top;
but all my results ended up with something like this:
What is the solution to stack them properly underneath each other like the first picture? Similar to how pinterest stacks the pin boxes...
jsFiddle for testing.