I know how to create horizontal columns with inline-blocks as proposed here, but using this technique the items on the second line are displayed with a vertical gap when having different heights.
I don't want the vertically gaps between the tiles. How to get rid of them with only using CSS?
What I now have looks like this:
<div class="tilecontainer">
<div class="tile">
<div class="content">
<strong>#1</strong>
<p>Ut augue urna, tristique ut turpis quis, lobortis iaculis libero. Cras maximus rhoncus enim vitae blandit. Maecenas elit elit, vulputate sit amet velit volutpat, vulputate egestas sem.</p>
</div>
</div>
<div class="tile">
<div class="content">
<strong>#2</strong>
<p>Vestibulum ipsum quam, faucibus nec aliquet eget, molestie vel urna. Integer et dui mi.</p>
</div>
</div>
</div>
With this CSS:
.tilecontainer{
width: 100%;
}
.tile{
width:33.33333333%;
display: inline-block;
vertical-align: top;
margin: -2px;
}
JSFiddle: http://jsfiddle.net/tg1a905r/1/