-
Notifications
You must be signed in to change notification settings - Fork 843
/
Copy pathgrid-wrapper--download.html
73 lines (56 loc) · 1.42 KB
/
grid-wrapper--download.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- this is an example from the MDN Layout Cookbook -->
<title>CSS Cookbook: Grid Wrapper</title>
<style>
body {
background-color: #fff;
color: #333;
font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
padding: 0;
margin: 0;
}
.grid {
display: grid;
grid-template-columns: minmax(20px, 1fr) repeat(6, minmax(0, 130px)) minmax(20px, 1fr);
grid-auto-rows: minmax(100px, auto);
grid-gap: 10px;
}
.grid>* {
border: 2px solid rgb(95, 97, 110);
border-radius: .5em;
padding: 20px;
}
.full-width {
grid-column: 1 / -1;
}
.wrapper {
grid-column: 2 / -2;
}
.left-edge {
grid-column: 1 / -2;
}
.right-wrapper {
grid-column: 4 / -2;
}
</style>
</head>
<body>
<div class="grid">
<div class="wrapper">
<p>This item aligns to a central “wrapper” – columns that have a maximum width.</p>
</div>
<div class="full-width">
<p>This item aligns to the edge of the grid container.</p>
</div>
<div class="left-edge">
<p>This item aligns to the left edge of the grid container and the right edge of the wrapper.</p>
</div>
<div class="right-wrapper">
<p>This item aligns to the right edge of the “wrapper” columns.</p>
</div>
</div>
</body>
</html>