forked from AustinCodingAcademy/learn
/
example.css
87 lines (76 loc) · 1.16 KB
/
example.css
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
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
}
header {
grid-area: header;
color: white;
padding: 10px;
font-family: 'Gill Sans';
font-size: 200%;
text-align: center;
background-image: url('./bridge.jpg');
background-size: cover;
background-position: center;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
main {
grid-area: main;
color: #2d2f77;
padding: 10px;
text-align: center;
}
nav {
grid-area: nav;
background-color: #2d2f77;
color: white;
padding: 10px;
text-decoration: none;
}
nav ul {
list-style: none;
display: flex;
justify-content: center;
}
nav ul li a {
text-decoration: none;
color: white;
}
nav ul li {
padding: 10px;
}
footer {
color: #2d2f77;
text-align: center;
}
img {
width: 25%;
}
.container {
display: grid;
grid-template-areas:
"nav"
"header"
"main"
"footer";
}
@media (min-width: 700px) {
.container {
grid-template-columns: 1fr 3fr;
grid-template-areas:
"header header"
"nav main"
"nav footer";
}
nav ul {
display: flex;
flex-direction: column;
}
}