-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnested_grid.html
More file actions
58 lines (52 loc) · 1.11 KB
/
nested_grid.html
File metadata and controls
58 lines (52 loc) · 1.11 KB
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
<!DOCTYPE html>
<html>
<head>
<title>CSS Grid</title>
<style>
body {
margin-top: 40px;
}
.container {
display: grid;
grid-template-columns: repeat(4, 100px);
grid-gap: 10px;
}
.box {
background-color: #444;
color: #fff;
border-radius: 2px;
padding: 10px;
}
.a {
grid-column: 3 / span 2;
grid-row: 3;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 10px;
}
.a > .box {
background: blue;
}
.b {
grid-column: 3/5;
}
</style>
</head>
<body>
<section class="container">
<div class="box a">
<div class="box">a1</div>
<div class="box">a2</div>
<div class="box">a3</div>
<div class="box">a4</div>
</div>
<div class="box b">B</div>
<div class="box c">C</div>
<div class="box d">D</div>
<div class="box e">E</div>
<div class="box f">F</div>
<div class="box g">G</div>
<div class="box h">H</div>
</section>
</body>
</html>