I have an unordered list that gets dynamically filled with list-items from 1 up to anything. This list is styled as columns using column count. If there are more 3 ore more items in the list, everything is fine. But when there are two or only one item I want to position them in the middle.
HTML:
<ul class="list">
<li class="list-item">Text</li>
<li class="list-item">Text</li>
</ul>
CSS:
.list {
-moz-column-count: 3;
-moz-column-gap: 1px; }`
.list-item {
position: relative;
padding: 0.46667rem 1.2rem;
overflow: hidden;
border-bottom: 1px solid #FFF;
background-color: #EEE;
}
Demo: http://codepen.io/anon/pen/NPBKBd
Here is an image: