-
Notifications
You must be signed in to change notification settings - Fork 0
/
32_grid_template_areas.html
132 lines (119 loc) · 3.21 KB
/
32_grid_template_areas.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grid Template Areas</title>
<style>
body {
font-family: Georgia, 'Times New Roman', Times, serif;
background: #d1caca;
}
.container {
display: grid;
grid-template-areas:
'header header header'
'content content sidebar'
'box-1 box-2 box-3'
'footer footer footer'
;
/* grid-template-rows: 1fr 2fr 1fr 0.5fr; */
}
.header {
grid-area: header;
background: #4f4f4f;
}
.content {
grid-area: content;
}
.sidebar {
grid-area: sidebar;
}
.box-1 {
grid-area: box-1;
}
.box-2 {
grid-area: box-2;
}
.box-3 {
grid-area: box-3;
}
.footer {
text-align: center;
}
.bg-dark {
background: #4f4f4f;
border: black 1px solid;
color: #fff;
}
@media screen and (max-width: 360px) {
.container {
grid-template-areas:
'header'
'content'
'sidebar'
'box-1'
'box-2'
'box-3'
'footer'
;
}
}
</style>
</head>
<body>
<div class="container">
<header class="header">
<h1>My Website</h1>
</header>
<section class="content">
<h3>Welcome to mi website</h3>
<p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Laborum
libero cupiditate ullam quia numquam, dolorem sequi soluta laboriosam
eaque consectetur.
</p>
</section>
<aside class="sidebar">
<h3>Contact Us</h3>
<ul>
<li>Some Company</li>
<li>50 main st, Boston MA</li>
<li>[email protected]</li>
<li>1-555-555-555</li>
</ul>
</aside>
<div class="box-1">
<h3>Heading 1</h3>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Alias iste
laboriosam animi. Excepturi delectus inventore provident? Eaque, dicta
esse at dolorum provident porro aspernatur aut aliquam facilis nulla
praesentium ipsam.
</p>
</div>
<div class="box-2">
<h3>Heading 2</h3>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Alias iste
laboriosam animi. Excepturi delectus inventore provident? Eaque, dicta
esse at dolorum provident porro aspernatur aut aliquam facilis nulla
praesentium ipsam.
</p>
</div>
<div class="box-3">
<h3>Heading 3</h3>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Alias iste
laboriosam animi. Excepturi delectus inventore provident? Eaque, dicta
esse at dolorum provident porro aspernatur aut aliquam facilis nulla
praesentium ipsam.
</p>
</div>
</div>
<footer class="footer bg-dark">
<p>Copyright © 2020 - Marco A. Montilla R.</p>
</footer>
</main>
</body>
</html>