Skip to content

Instantly share code, notes, and snippets.

@huntercaron
Forked from anonymous/index.html
Created January 28, 2015 17:36
Show Gist options
  • Save huntercaron/e8572a41e26ad28a92f7 to your computer and use it in GitHub Desktop.
Save huntercaron/e8572a41e26ad28a92f7 to your computer and use it in GitHub Desktop.
Test Flexbox Grid
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Flexbox</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/stylesheet.css">
</head>
<body>
<h1>Flexin</h1>
<main>
<div></div>
<div></div>
<div></div>
<div></div>
</main>
</body>
</html>
/* This uses flexbox, if you have issues google flexbox
Layout stuff is this first section*/
main {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: space-around;
justify-content: space-around;
max-width: 840px;
margin: auto;
}
div {
text-align: center;
margin: 10px;
height: 400px;
width: 400px;
background-color: #4dadc4;
}
/* text formatting */
h1 {
display: block;
margin: auto;
text-align: center;
font-family: Helvetica, sans-serif;
padding: 15px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment