-
Notifications
You must be signed in to change notification settings - Fork 61
/
nav-style.css
108 lines (106 loc) · 1.93 KB
/
nav-style.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
102
103
104
105
106
107
108
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
a {
text-decoration: none;
}
li {
list-style: none;
}
/* NAVBAR MENU */
.navbar {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
background-color: rgb(19, 4, 104);
color: #fff;
}
.nav-links a {
color: #fff;
}
.menu {
display: flex;
gap: 1em;
font-size: 18px;
}
.menu li:hover {
background-color: rgb(28, 6, 150);
border-radius: 5px;
transition: 0.3s ease;
}
.menu li {
padding: 5px 14px;
}
/* DROPDOWN MENU */
.services {
position: relative;
}
.dropdown {
background-color: rgb(19, 4, 104);
padding: 1em 0;
position: absolute;
display: none;
border-radius: 8px;
top: 35px;
}
.dropdown li + li {
margin-top: 10px;
}
.dropdown li {
padding: 0.5em 1em;
width: 8em;
text-align: center;
}
.dropdown li:hover {
background-color: rgb(28, 6, 150);
}
.services:hover .dropdown {
display: block;
}
input[type=checkbox]{
display: none;
}
.hamburger {
display: none;
font-size: 24px;
user-select: none;
}
/* APPLYING MEDIA QUERIES */
@media (max-width: 768px) {
.menu {
display:none;
position: absolute;
background-color:rgb(19, 4, 104);
right: 0;
left: 0;
text-align: center;
padding: 16px 0;
}
.menu li:hover {
display: inline-block;
background-color:rgb(28, 6, 150);
transition: 0.3s ease;
}
.menu li + li {
margin-top: 12px;
}
input[type=checkbox]:checked ~ .menu{
display: block;
}
.hamburger {
display: block;
}
.dropdown {
left: 50%;
top: 30px;
transform: translateX(35%);
}
.dropdown li:hover {
background-color: rgb(28, 6, 150);
}