Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Created December 11, 2018 10:57
Show Gist options
  • Save harrisonmalone/41e4d0ebb8f7ff1c5223ae3a851f816b to your computer and use it in GitHub Desktop.
Save harrisonmalone/41e4d0ebb8f7ff1c5223ae3a851f816b 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>
.wrapper {
max-width: 700px;
margin: 0 auto;
}
img {
width: 100%;
height: auto;
}
ul {
padding: 0;
}
li {
display: inline;
}
.card-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.col {
width: 50%;
margin: 10px 0px;
}
.card {
height: 400px;
border: 1px solid black;
box-sizing: border-box;
margin: 0px 10px;
/* position: relative; */
display: grid;
grid-template-columns: 0.45fr 0.55fr;
grid-template-rows: 0.33333fr 0.33333fr 0.33333fr;
}
.avatar-container {
grid-column: 1 / 2;
grid-row: 1 / 2;
display: flex;
justify-content: center;
align-items: center;
}
.avatar {
width: 50px;
height: 50px;
border-radius: 50%;
background: dodgerblue;
/* position: absolute;
left: 40px;
top: 100px; */
}
.name {
grid-column: 2 / 3;
grid-row: 1 / 2;
display: flex;
justify-content: center;
align-items: center;
}
@media only screen and (max-width: 500px) {
.col {
width: 100%;
}
}
</style>
</head>
<body>
<div class="wrapper">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
</ul>
<h3>Heading</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<img src="https://www.cesarsway.com/sites/newcesarsway/files/styles/large_article_preview/public/Common-dog-behaviors-explained.jpg" alt="dog">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<div class="card-wrapper">
<div class="col">
<div class="card">
<div class="avatar-container">
<div class="avatar">
</div>
</div>
<div class="name">
<h3>Harrison</h3>
</div>
</div>
</div>
<div class="col">
<div class="card">
</div>
</div>
<div class="col">
<div class="card">
</div>
</div>
<div class="col">
<div class="card">
</div>
</div>
<div class="col">
<div class="card">
</div>
</div>
<div class="col">
<div class="card">
</div>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment