-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrid-area.html
More file actions
executable file
·68 lines (64 loc) · 1.63 KB
/
Copy pathgrid-area.html
File metadata and controls
executable file
·68 lines (64 loc) · 1.63 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
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<title>CSS Grid-Template-Area</title>
<style>
body{ font-family: arial,helvetica; }
h1{ padding: 0 0 0 40px; }
.container{
background: #eee;
width: 720px;
margin: 45px auto 0;
display: grid;
grid-template-columns:repeat(3, 1fr) ;
grid-template-rows: 120px 60px 100px 400px 50px;
grid-gap:15px;
grid-template-areas: "header header header"
"menu menu menu"
"box1 box2 sidebar"
"content content sidebar"
"footer footer footer";
}
.header{
background: orangered;
grid-area: header;
}
.menu{
background: yellowgreen;
grid-area: menu;
}
.box1{
background: MEDIUMPURPLE;
grid-area: box1;
}
.box2{
background: hotpink;
grid-area: box2;
}
.sidebar{
background: royalblue;
grid-area: sidebar;
}
.content{
background: #7DCEA0;
grid-area: content;
}
.footer{
background: goldenrod;
grid-area: footer;
}
.items{ color: #fff;font-size: 20px;font-weight: bold;padding: 10px;}
</style>
</head>
<body>
<div class="container">
<div class="items header">Header</div>
<div class="items menu">Menu</div>
<div class="items box1">Box 1</div>
<div class="items box2">Box 2</div>
<div class="items sidebar">Sidebar</div>
<div class="items content">Content</div>
<div class="items footer">Footer</div>
</div>
</body>
</html>