-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcssgrid2.html
More file actions
46 lines (40 loc) · 942 Bytes
/
Copy pathcssgrid2.html
File metadata and controls
46 lines (40 loc) · 942 Bytes
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS Grid #02</title>
<style>
html,
body {
margin: 20px;
height: calc(100% - 40px);
background-color: lightgray;
}
div {
display: flex;
align-items: center;
justify-content: center;
font-size: 30px;
border: solid 5px dodgerblue;
background: #fff;
}
body {
display: grid;
grid-template-columns:
[inicio] 1fr
[metade-1 meio-1] 1fr
[metade-2 meio-2] 1fr [fim];
grid-template-rows: repeat(3, fr);
}
.d1 {
grid-column-start: metade-2;
grid-column-end: fim
}
</style>
</head>
<body>
<div class="d1">1</div>
<div class="d2">2</div>
<div class="d3">3</div>
</body>
</html>