Skip to content

Instantly share code, notes, and snippets.

@tejuafonja
Created December 9, 2016 18:28
Show Gist options
  • Save tejuafonja/67f64f7d78f5b268397d1a3f89bc981c to your computer and use it in GitHub Desktop.
Save tejuafonja/67f64f7d78f5b268397d1a3f89bc981c to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flex</title>
<style>
#container {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: center;
height: 90vh;
}
#header {
flex: 0 0 200px;
background-color: lightgreen;
height: 200px;
border-radius: 1rem;
}
#main {
flex: 0 0 200px;
background-color: coral;
height: 200px;
border-radius: 1rem;
}
#footer {
flex: 0 0 200px;
background-color: silver;
height: 200px;
border-radius: 1rem;
}
@media screen and (max-width: 915px) {
#container {
flex-flow: column wrap-reverse;
}
}
</style>
</head>
<body>
<div id="container">
<div id="header"></div>
<div id="main"></div>
<div id="footer"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment