-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss-grid-layout-2.html
More file actions
54 lines (51 loc) · 1.26 KB
/
css-grid-layout-2.html
File metadata and controls
54 lines (51 loc) · 1.26 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Grid Layout 2</title>
<style>
* {box-sizing:border-box}
body {
display: flex;
justify-content: center;
align-items: center;
}
.wrapper {
height: 80vh;
width: 80vw;
display: grid;
grid-template-columns: 21% 79%;
grid-template-rows: 10% auto 10% 10%;
}
.box {
padding: 1em;
background-color: #A5CA50;
border: 4px white solid;
}
header {grid-area: 1 / 1 / 2 / -1}
nav {grid-area: 2 / 1 / -2 / 2}
main {grid-area: 2 / 2 / -3 / -1}
.advert {grid-area: 3 / 2 / -2 / -1}
footer {grid-area: 4 / 1 / -1 / -1 }
</style>
</head>
<body>
<div class="wrapper">
<header class="box">
<span>Header</span>
</header>
<nav class="box">
<span>Nav</span>
</nav>
<main class="box">
<span>Article</span>
</main>
<section class="advert box">
<span>Ads</span>
</section>
<footer class="box">
<span>Footer</span>
</footer>
</div>
</body>
</html>