Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Created September 23, 2018 13:08
Show Gist options
  • Save harrisonmalone/e7e95adfbee551c2f5c9b1408721bc07 to your computer and use it in GitHub Desktop.
Save harrisonmalone/e7e95adfbee551c2f5c9b1408721bc07 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
@media only screen and (min-width: 200px) {
a {
text-decoration: none;
color: inherit;
}
body {
margin: 0;
background-color:darkslategray;
}
nav {
height: 10vh;
background-color: white;
}
.container {
background-color: #f1efef;
margin: 0 auto;
}
.grid {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: repeat(6, 1fr);
}
.card {
background: white;
box-shadow: 0 0 10px rgba(0,0,0,0.3);
margin: 10px;
display: flex;
justify-content: center;
align-items: center;
}
.profile {
grid-row-start: 1;
grid-row-end: 3;
}
.btn {
border-radius: 5px;
display: inline-block;
color: white;
font-family: sans-serif;
padding: 4px;
font-weight: 400;
}
.btn-primary {
background-color: rgba(100,149,237, 0.9);
}
.btn-primary:hover {
background-color: rgba(100,149,237, 0.85);
}
}
@media only screen and (min-width: 950px) {
a {
text-decoration: none;
color: inherit;
}
body {
margin: 0;
background-color:darkslategray;
}
nav {
height: 10vh;
background-color: white;
}
.container {
background-color: #f1efef;
margin: 0 auto;
width: 970px;
}
.grid {
display: grid;
grid-template-columns: 1.5fr 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr;
height: 80vh;
margin: 30px 20px;
}
.card {
background: white;
box-shadow: 0 0 10px rgba(0,0,0,0.3);
margin: 10px;
display: flex;
justify-content: center;
}
.profile {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 3;
}
.description {
grid-column-start: 2;
grid-column-end: 5;
}
}
</style>
</head>
<body>
<nav></nav>
<div class="container">
<div class="grid">
<div class="card profile">
<div class="content">
<h2>Hi my name is Harrison</h2>
<div class="btn btn-primary"><a href="#">Find out more</a></div>
</div>
</div>
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
<div class="card description"></div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment