-
Notifications
You must be signed in to change notification settings - Fork 0
/
29_grid_rows.html
45 lines (42 loc) · 1.05 KB
/
29_grid_rows.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grid Rows</title>
<style>
* {
margin: 0;
padding: 0;
}
.grid {
display: grid;
grid-template-columns: repeat(2, 2fr);
grid-template-rows: 1fr 2fr 3fr;
/* sets the reamining items in grig with this value */
grid-auto-rows: 1.5fr;
}
body {
background: #b8b7b7;
}
.item {
background-color: rgb(228, 181, 95);
border: yellow 1px solid;
color: white;
padding: 3rem;
/* height: 3rem; can affect the grig behavior of rows display*/
text-align: center;
}
</style>
</head>
<body>
<div class="grid">
<div class="item">Item 1</div>
<div class="item">Item 2</div>
<div class="item">Item 3</div>
<div class="item">Item 4</div>
<div class="item">Item 5</div>
<div class="item">Item 6</div>
</div>
</body>
</html>