Skip to content

Instantly share code, notes, and snippets.

@dinks
Created September 24, 2014 13:39
Show Gist options
  • Select an option

  • Save dinks/169500a21276debd6f27 to your computer and use it in GitHub Desktop.

Select an option

Save dinks/169500a21276debd6f27 to your computer and use it in GitHub Desktop.
A Pen by Dinesh Vasudevan.
<ul class="flex-container">
<li class="flex-item">1</li>
<li class="flex-item">2</li>
<li class="flex-item">3</li>
<li class="flex-item">4</li>
<li class="flex-item">5</li>
<li class="flex-item">6</li>
<li class="flex-item">7</li>
<li class="flex-item">8</li>
<li class="flex-item">9</li>
<li class="flex-item">10</li>
<li class="flex-item">11</li>
<li class="flex-item">12</li>
<li class="flex-item">13</li>
</ul>
@import "compass/css3";
.flex-container {
padding: 0;
margin: 0;
list-style: none;
border: 1px solid #777777;
height: 300px;
display: block;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
align-items: center;
flex-wrap: wrap;
flex-flow: flex-direction;
-webkit-flex-flow: row wrap;
justify-content: center;
}
.flex-item {
background: tomato;
padding: 5px;
margin-right: 10px;
width: 200px;
height: 150px;
margin-top: 10px;
border: 1px solid #112211;
line-height: 150px;
color: white;
font-weight: bold;
font-size: 3em;
text-align: center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment