-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixed-navigation-bar.css
120 lines (116 loc) · 2.06 KB
/
fixed-navigation-bar.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
.fixed-nav-bar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 9999;
width: 100%;
height: 70px;
background-color: #ffffff;
}
/* The element at the top of the page right after the fixed navigation bar
MUST have sufficient top margin or else it will be covered by the bar */
.content {
margin-top: 20px;
}
/* Example responsive navigation menu */
.fixed-nav-bar li, .fixed-nav-bar a {
height: 50px;
line-height: 50px;
}
.menu {
width: 90%;
max-width: 960px;
margin: 0 auto;
}
.menu a, .menu a:visited {
color: #330066;
}
.menu a:hover, .menu a:target {
color: #330066;
}
.menu-items {
display: inline-block;
}
.menu-items-social {
display: inline-block;
}
.sitename {
display: inline-block;
margin-right: 20px;
margin-left: 10px;
}
a.sitename, a:visited.sitename {
color: #330066;
}
.menu-items li {
display: inline-block;
margin-right: 10px;
margin-left: 10px;
}
.menu-items a {
text-decoration: none;
}
.menu-items-social li {
display: inline-block;
margin-right: 10px;
margin-left: 10px;
}
.show, .hide {
display: none;
padding-left: 15px;
background-color: transparent;
background-repeat: no-repeat;
background-position: center left;
color: #330066;
}
.show {
background-image: url(assets/down-arrow-icon.png);
}
.hide {
background-image: url(assets/up-arrow-icon.png);
}
@media only screen and (max-width: 800px) {
.menu {
position: relative;
width: 100%;
}
.sitename {
position: absolute;
top: 0;
left: 15px;
margin-left: 0px;
}
.menu-items {
display: none;
width: 100%;
margin-top: 50px;
background-color: #ffffff;
}
.menu-items li {
display: block;
text-align: center;
}
.show, .hide {
position: absolute;
top: 0;
right: 15px;
}
.show {
display: inline-block;
}
.hide {
display: none;
}
#menu:target .show {
display: none;
}
#menu:target .hide, #menu:target .menu-items {
display: inline-block;
}
}
@media only screen and (max-width: 220px) {
.sitename, .show, .hide {
font-size: 14px;
}
}