Skip to content

Instantly share code, notes, and snippets.

@luiz
Created June 18, 2014 17:31
Show Gist options
  • Save luiz/524af13533548c068fb5 to your computer and use it in GitHub Desktop.
Save luiz/524af13533548c068fb5 to your computer and use it in GitHub Desktop.
Multiline boxes
/* Multiline boxes */
.exp {
width: 40ch;
margin: 1em;
background-color: #FFB;
}
.caixinha {
width: 10ch;
height: 2em;
background-color: #FF6;
border: .25em solid orange;
}
.text {
text-align: justify;
text-align-last: center;
}
.text .caixinha {
display: inline-block;
}
.flex {
display: flex;
flex-flow: wrap;
justify-content: space-between;
}
.tab {
display: table;
}
.tab .caixinha {
display: table-cell;
}
<section class="text exp">
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
</section>
<section class="flex exp">
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
</section>
<section class="tab exp">
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
<div class=caixinha></div>
</section>
// alert('Hello world!');
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment