-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasic.css
101 lines (80 loc) · 1.58 KB
/
basic.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
main {
max-width: 960px;
margin: 1rem auto;
padding: 1rem 2rem;
font-size: 130%;
line-height: 1.3;
}
header {
background-color: seagreen;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
color: white;
font-size: 200%;
}
nav {
text-align: right;
}
nav ul {
display: flex;
text-align: center;
}
nav a {
text-decoration: none;
color: snow;
margin: 0 1rem;
padding: .5rem 1rem;
border-radius: 1.5rem;
}
nav a:hover {
background-color: #19462d;
}
/* ↓ Hides the checkbox in desktop mode ↓ */
nav input[type="checkbox"],
nav label {
display: none;
}
/* ↓ Responsie Hamburger Mode ↓ */
@media (max-width: 600px) {
/* ↓ Hides the links if the checkbox isn't clicked ↓ */
input[type="checkbox"]:not(:checked)+ul {
display: none;
}
/* ↓ The hamburger icon ↓ */
header nav label {
display: block;
padding: 0.25em;
align-self: center;
color: white;
font-size: 200%;
background-color: #19462d;
}
/* Because we are in mobile mode, we want to display it as a vertical list */
nav ul {
background-color: #cacbca;
flex-direction: column;
}
nav ul li {
text-align: right;
padding: 0;
border-bottom: 3px solid silver;
}
nav ul li:last-child {
border-bottom: none;
}
nav ul li a {
display: block;
font-size: 150%;
color: black;
margin: 0;
border-radius: 0;
padding: .5rem 2rem;
}
nav ul li a:hover {
color: white;
}
}