-
-
Save clickstudio/fdcd16a392205664a3fe7c7deb6621c8 to your computer and use it in GitHub Desktop.
Working Example: https://codepen.io/reggs/pen/KKPNbMr
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
<div class="container"> | |
<div class="cards"> | |
<div class="card"> | |
<div class="card-inner">Hello there</div> | |
</div> | |
<div class="card"> | |
<div class="card-inner">Hello there</div> | |
</div> | |
<div class="card"> | |
<div class="card-inner">Hello there</div> | |
</div> | |
<div class="card"> | |
<div class="card-inner">Hello there</div> | |
</div> | |
<div class="card"> | |
<div class="card-inner">Hello there</div> | |
</div> | |
</div> | |
</div> |
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
/* Grid will not work without this */ | |
*,* :before, *:after { | |
box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
} | |
body { | |
color: white; | |
font-family: sans-serif; | |
font-weight: bold; | |
} | |
.container { | |
max-width: 800px; | |
margin: 0 auto; | |
border: 1px solid red; | |
} | |
.cards { | |
display: flex; | |
flex-wrap: wrap; | |
width: calc(100% + 30px); | |
margin: -15px; | |
} | |
.card { | |
width:50%; | |
@media(max-width:400px) { | |
width: 50%; | |
} | |
padding: 15px; | |
} | |
.card-inner{ | |
background:blue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment