CodePen

HTML

            
              <!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Test</title>
</head>
<body>
  
  
  <div class="page-wrap main">

	<div class="grid">

		<article class="box article">
			<header class="clearfix">
					1 <br > a
			</header>
		</article>

		<article class="box article">
			<header class="clearfix">
					2 <br> a <br> b
			</header>
		</article>

		<article class="box article">
			<header class="clearfix">
					3 <br> a
			</header>
		</article>

		<article class="box article">
			<header class="clearfix">
					4 <br> a
			</header>
		</article>

		<article class="box article">
			<header class="clearfix">
					5 <br> a <br> b
			</header>
		</article>

		<article class="box article">
			<header class="clearfix">
					6 <br> a <br> b <br> c
			</header>
		</article>

	</div> <!-- END .grid  (Content) -->

</div> <!-- END .page-wrap (Content) -->
  
  
</body>
</html>
            
          
!
via HTML Inspector

CSS

            
              body {
  background-color: #ebebeb;
}

.page-wrap {
  width: 90%;
  max-width: 1280px;
  margin: 0 5%;
}

.grid {
  -webkit-column-count: 3;
  -moz-column-count: 3;
  column-count: 3;

  -webkit-column-gap: 20px;
  -moz-column-gap: 20px;
  column-gap: 20px;
  -webkit-column-fill: auto;
  -moz-column-fill: auto;
  column-fill: auto;
}

.box {
  display: inline-block;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  column-break-inside: avoid;
  padding: 1px;
  width: 100%;
}

.article {
  background-color: #ffffff;
  margin-top: 20px;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................