-
Notifications
You must be signed in to change notification settings - Fork 0
/
navigation.css
129 lines (113 loc) · 2.27 KB
/
navigation.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/* Navigation Content */
/* Navbar CSS Code */
.navbar {
font-family: Arial, Helvetica, sans-serif;
background-color: black;
overflow: hidden;
margin-top: 0px;
}
/* Inner Navbar ul Design CSS Code */
.navbar ul {
display: flex;
align-items: center;
list-style-type: none;
color: white;
font-weight: bold;
}
.navbar ul li {
padding: 0 20px;
cursor: pointer;
}
.navbar ul li:hover {
background-color: white;
padding: 10px 20px;
color: black;
border-radius: 8px;
}
.right {
display: inline-block;
right: 20px;
top: 20;
position: absolute;
}
/* The dropdown container */
.dropdown {
float: left;
overflow: hidden;
}
/* Dropdown button */
.dropdown .dropbtn {
font-weight: bold;
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit; /* Important for vertical align on mobile phones */
margin: 0; /* Important for vertical align on mobile phones */
}
/* Add a red background color to navbar links on hover */
.dropdown:hover .dropbtn {
background-color: red;
}
/* Dropdown content (hidden by default) */
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
width: 140px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
/* Add a grey background color to dropdown links on hover */
.dropdown-content a:hover {
background-color: #ddd;
}
/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
display: block;
}
/* Responsive CSS Code */
@media only screen and (max-width: 1230px) {
.navbar ul {
display: flex;
flex-direction: column;
height: 260px;
padding: 12px;
line-height: 3.1;
font-weight: bold;
font-size: 1rem;
transition: 0.8s;
}
.navbar ul li:hover{
padding: 0px 20px;
}
}
@media screen and (max-width: 750px) {
.navbar ul {
height: 240px;
transition: 0.5s;
}
.navbar ul li{
font-size: 0.9rem;
}
.dropdown .dropbtn {
font-weight: bold;
font-size: 0.9rem;
}
.dropdown-content {
font-size: 0.9rem;
line-height: 1.2;
width: 130px;
}
}