Skip to content

Instantly share code, notes, and snippets.

@wfpaisa
Last active August 29, 2015 14:04
Show Gist options
  • Save wfpaisa/9c47823197c8f73eef67 to your computer and use it in GitHub Desktop.
Save wfpaisa/9c47823197c8f73eef67 to your computer and use it in GitHub Desktop.
Demo de funcionamiento con el flexbox, ver mas info: http://css-tricks.com/snippets/css/a-guide-to-flexbox/
<ul class="flex-container">
<li class="flex-item">1</li>
<li class="flex-item">2</li>
<li id="pepito" 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>
</ul>
.flex-container {
padding: 0;
margin: 0;
list-style: none;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: space-between;
align-items: flex-end;
height:1000px;
}
.flex-item {
background: tomato;
padding: 0px;
width: 25%;
height: 150px;
border:1px solid #ccc;
line-height: 150px;
color: white;
font-weight: bold;
font-size: 3em;
text-align: center;
-webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box;
}
#pepito{
height:300px;
order:2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment