-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss_grid
57 lines (55 loc) · 1.14 KB
/
css_grid
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Exercise 1</title>
<meta
content="width=device-width, initial-scale=1, maximum-scale=1"
name="viewport"
/>
<style>
.container{
/* Step 1: Set display to grid */
display:grid;
/* Step 2: setup rows amd columns */
grid-template-columns: 300px 300px 300px;
grid-template-rows: 250px 600px;
grid-template-areas:
"hd hd hd hd hd hd hd hd"
"sd sd sd main main main main main"
"ft ft ft ft ft ft ft ft"
"ft1 ft1 ft1 ft1 ft1 ft1 ft1 ft1"
;
border: 2px solid yellow;
}
.box{
border: 1px solid red;
background: #F8FA9D;
}
.header{
grid-area:hd;
}
.footer{
grid-area:ft;
}
.footer{
grid-area:ft1;
}
.sidebar{
grid-area:sd;
}
.content{
grid-area:main;
}
</style>
</head>
<body>
<div class = "container">
<div class="header box">Header</div>
<div class="sidebar box">Sidebar</div>
<div class="content box">Content</div>
<div class="footer box">Footer</div>
<div class="footer1 box">Footer1</div>
</div>
</body>
</html>