Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (62 sloc) 2.32 KB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Chapter 3: A Simple Grid Layout</title>
<link rel="stylesheet" href="../assets/css/common.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto+Slab" rel="stylesheet">
<style>
.cards {
margin: 0;
padding: 0;
list-style: none;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap:20px;
}
.cards li {
background-color: #e5dbff;
border: 1px solid #d0bfff;
padding: 10px;
border-radius: 5px;
}
</style>
</head>
<body id="ch1">
<header class="example-header">
<ul class="meta">
<li class="book">The New CSS Layout</li>
<li class="author">Rachel Andrew</li>
<li class="chapter">Chapter 3</li>
<li class="index"><a href="../">Index of examples</a></li>
</ul>
<div class="inner">
<h1>Grid Items</h1>
</div>
</header>
<div class="example">
<ul class="cards">
<li>
<h2>Card 1</h2>
<p>These cards have been laid out using grid layout. By setting <code>display: grid</code> on the parent, all direct children become grid items.</p>
</li>
<li>
<h2>Card 2</h2>
<p>These cards have been laid out using grid layout. By setting <code>display: grid</code> on the parent, all direct children become grid items.</p>
</li>
<li>
<h2>Card 3</h2>
<p>These cards have been laid out using grid layout. By setting <code>display: grid</code> on the parent, all direct children become grid items.</p>
</li>
<li>
<h2>Card 4</h2>
<p>These cards have been laid out using grid layout. By setting <code>display: grid</code> on the parent, all direct children become grid items.</p>
</li>
<li>
<h2>Card 5</h2>
<p>These cards have been laid out using grid layout. By setting <code>display: grid</code> on the parent, all direct children become grid items.</p>
</li>
</ul>
</div>
</body>
</html>
You can’t perform that action at this time.