-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtut17.htm
More file actions
41 lines (37 loc) · 1.14 KB
/
tut17.htm
File metadata and controls
41 lines (37 loc) · 1.14 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS grid</title>
<style>
.grid{
display: grid;
grid-template-rows:1fr 1fr 4fr ;
/* It will command only first 3 rows */
grid-auto-rows: 2fr;
/* This will tell thos rows which are not defined by grid templete rows */
grid-template-columns:repeat(4, 2fr);
grid-gap: 1rem;
}
.box{
background-color: red;
border: 2px solid black;
}
</style>
</head>
<body>
<div class="grid">
<div class="box">This is a box-1</div>
<div class="box">This is a box-2</div>
<div class="box">This is a box-3</div>
<div class="box">This is a box-4</div>
<div class="box">This is a box-5</div>
<div class="box">This is a box-6</div>
<div class="box">This is a box-7</div>
<div class="box">This is a box-8</div>
<div class="box">This is a box-9</div>
<div class="box">This is a box-10</div>
</div>
</body>
</html>