Created
December 12, 2016 11:42
-
-
Save ftonato/a2694cc770decf29656cbbf4bd2a648b to your computer and use it in GitHub Desktop.
Basic Flexbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Basic Flexbox</title> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
main { | |
display: flex; | |
flex-wrap: wrap; | |
height: 100%; | |
} | |
.box { | |
padding-top: 2rem; | |
padding-bottom: 2rem; | |
} | |
.first { | |
width: 100%; | |
order: 1; | |
background-color: #f1c40f; | |
} | |
.second { | |
width: 33.33%; | |
order: 2; | |
background-color: #e67e22; | |
} | |
.third { | |
width: 33.33%; | |
order: 3; | |
background-color: #e74c3c; | |
} | |
.fourth { | |
width: 33.33%; | |
order: 4; | |
background-color: #9b59b6; | |
} | |
.fifth { | |
width: 50%; | |
order: 5; | |
background-color: #1abc9c; | |
} | |
.sixth { | |
width: 50%; | |
order: 5; | |
background-color: #34495e; | |
} | |
</style> | |
</head> | |
<body> | |
<main> | |
<div class="box first"> </div> | |
<div class="box second"> </div> | |
<div class="box third"> </div> | |
<div class="box fourth"> </div> | |
<div class="box fifth"> </div> | |
<div class="box sixth"> </div> | |
</main> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment