-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex3.html
More file actions
77 lines (66 loc) · 1.96 KB
/
Copy pathindex3.html
File metadata and controls
77 lines (66 loc) · 1.96 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
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.container {
background-color: #ddd;
width: 800px;
height: 500px;
margin: auto;
display: grid;
grid-template-columns: repeat(4, [col-start] 1fr [col-end]);
grid-template-rows: [header-start] 1fr [header-end main-start] 1fr 1fr [main-end box-start] 1fr [box-end footer-start] 1fr [footer-end];
gap: 1rem;
}
.container div {
background-color: royalblue;
padding: 1rem;
font-size: 1.5rem;
text-align: center;
color: #fff;
}
.header {
grid-column: col-start 1 / col-end 4;
grid-row: header-start / header-end;
}
.sidebar {
grid-column: col-start 1 / col-end 1;
grid-row: main-start / box-end;
}
.main {
grid-row: main-start / main-end;
grid-column: col-start 2 / col-end -1;
}
.box-1 {
grid-column: col-start 2 / col-end 2;
grid-row: box-start / box-end;
}
.box-2 {
grid-column: col-start 3 / col-end 3;
grid-row: box-start / box-end;
}
.box-3 {
grid-column: col-start 4 / col-end 4;
grid-row: box-start / box-end;
}
.footer {
grid-column: 1/-1;
grid-row: footer-start / footer-end;
}
</style>
<title>Document</title>
</head>
<body>
<div class="container">
<div class="header">Header</div>
<div class="sidebar">Sidebar</div>
<div class="main">Main</div>
<div class="box-1">Box 1</div>
<div class="box-2">Box 2</div>
<div class="box-3">Box 3</div>
<div class="footer">Footer</div>
</div>
</body>
</html>