Skip to content

Instantly share code, notes, and snippets.

Forked from anonymous/dabblet.css
Created January 21, 2017 21:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
div {
width: 100px;
height: 100px;
/* Para deixar o texto centralizado na div,
podemos colocar um line-height igual à altura
dela. Só funciona bem se o texto tiver uma
linha só.
line-height: 100px;
text-align: center;
font-size: 25px;
.container {
width: 400px;
.primeiro {
background-color: red;
float: left;
.segundo {
background-color: blue;
float: leffloat: right;t;
.terceiro {
width: 200px;
height: 200px;
line-height: 200px;
background-color: green;
float: right;
.quarto {
background-color: orange;
float: left;
.quinto {
background-color: magenta;
float: left;
<div class="container">
<div class="primeiro">1</div>
<div class="segundo">2</div>
<div class="terceiro">3</div>
<div class="quarto">4</div>
<div class="quinto">5</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment