Skip to content

Instantly share code, notes, and snippets.

@cadetCoder
Last active September 10, 2019 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cadetCoder/bbc4083f96e76d096fc272e5c0a35b82 to your computer and use it in GitHub Desktop.
Save cadetCoder/bbc4083f96e76d096fc272e5c0a35b82 to your computer and use it in GitHub Desktop.
Flex box exercise
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
color: red;
font-family: 'Trebuchet MS';
text-align: center;
font-size: 50px;
box-sizing: border-box;
}
.wrapper {
height: 100%;
display:flex;
justify-content: space-around;
flex-flow: row wrap;
align: center;
}
.card {
border: 2px solid black;
border-radius: 3px;
padding: 60px 10px;
margin: 10px;
width: 140px;
height: 200px;
}
body{
margin: 0;
height: 100vh;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="card">2♥︎</div>
<div class="card">3♥︎</div>
<div class="card">4♥︎</div>
<div class="card">5♥︎</div>
<div class="card">6♥︎</div>
<div class="card">7♥︎</div>
<div class="card">8♥︎</div>
<div class="card">9♥︎</div>
<div class="card">10♥︎</div>
<div class="card">J♥︎</div>
<div class="card">Q♥︎</div>
<div class="card">K♥︎</div>
<div class="card">A♥︎</div>
</div>
</body>
</html>
* {
color: red;
font-family: 'Trebuchet MS';
text-align: center;
font-size: 50px;
box-sizing: border-box;
}
.wrapper {
height: 100%;
display:flex;
justify-content: space-around;
flex-flow: row wrap;
}
.card {
border: 2px solid black;
border-radius: 3px;
padding: 60px 10px;
margin: 10px;
width: 140px;
height: 200px;
-webkit-box-shadow: 8px 6px 11px 1px rgba(0,0,0,0.32);
box-shadow: 8px 6px 11px 1px rgba(0,0,0,0.32);
}
body{
margin: 0;
height: 100vh;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment