/
responsive-nav.css
200 lines (175 loc) · 3.78 KB
/
responsive-nav.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/*! responsive-nav.js v1.0.14 by @viljamis */
#mobile-header{
background: #E74C3C url('../images/mob-logo.png') left center no-repeat;
min-height: 50px;
position: fixed;
top: 0px;
width: 100%;
z-index: 9999 !important;
}
#nav ul {
margin: 0;
padding: 0;
width: 100%;
display: block;
list-style: none;
}
#nav li {
width: 100%;
display: block;
}
.js #nav {
clip: rect(0 0 0 0);
max-height: 0;
position: absolute;
display: block;
overflow: hidden;
zoom: 1;
}
#nav.opened {
max-height: 9999px;
}
@media screen and (min-width: 40em) {
.js #nav {
position: relative;
max-height: none;
}
#nav-toggle {
display: none;
}
}
/* ------------------------------------------
DEMO PAGE'S STYLES
--------------------------------------------- */
body, div,
h1, h2, h3, h4, h5, h6,
p, blockquote, pre, dl, dt, dd, ol, ul, li, hr,
fieldset, form, label, legend, th, td,
article, aside, figure, footer, header, hgroup, menu, nav, section,
summary, hgroup {
margin: 0;
padding: 0;
border: 0;
}
a:active,
a:hover {
outline: 0;
}
@-webkit-viewport { width: device-width; }
@-moz-viewport { width: device-width; }
@-ms-viewport { width: device-width; }
@-o-viewport { width: device-width; }
@viewport { width: device-width; }
body {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
color: #37302a;
background: #fff;
font: normal 100%/1.4 sans-serif;
}
#nav,
#nav * {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#nav,
#nav ul {
list-style: none;
width: 100%;
float: left;
}
#nav li {
float: left;
width: 49.8%;
border-right: solid 1px #fff;
}
@media screen and (min-width: 40em) {
#nav li {
width: 25%;
*width: 24.9%; /* IE7 Hack */
_width: 19%; /* IE6 Hack */
}
}
#nav a {
color: #fff;
text-decoration: none;
width: 100%;
background: #E74C3C;
border-bottom: 1px solid #fff;
padding: 0.9em 1em;
float: left;
font-family:"Open_Sans_R";
}
#nav a:hover {
color: #000;
text-decoration: none;
width: 100%;
background: #fff;
border-bottom: 1px solid #fff;
padding: 0.9em 1em;
float: left;
font-family:"Open_Sans_R";
}
@media screen and (min-width: 40em) {
#nav a {
margin: 0;
padding: 1em;
float: left;
text-align: center;
border-bottom: 0;
border-right: 1px solid white;
}
}
#nav ul ul a {
background: #ca3716;
padding-left: 2em;
}
@media screen and (min-width: 40em) {
#nav ul ul a {
display: none;
}
}
#nav-toggle {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
width: 70px;
height: 55px;
float: right;
text-indent: -9999px;
overflow: hidden;
background: #E74C3C url("hamburger.gif") no-repeat center center;
}
@media screen and (-webkit-min-device-pixel-ratio: 1.3), screen and (min--moz-device-pixel-ratio: 1.3), screen and (-o-min-device-pixel-ratio: 2 / 1), screen and (min-device-pixel-ratio: 1.3), screen and (min-resolution: 192dpi), screen and (min-resolution: 2dppx) {
#nav-toggle {
background-image: url("hamburger-retina.gif");
-webkit-background-size: 100px 100px;
-moz-background-size: 100px 100px;
-o-background-size: 100px 100px;
background-size: 100px 100px;
}
}
/*Additional Media Queries to position the header*/
@media (min-width: 640px) and (max-width: 960px){
#mobile-header{
width: 100%;
position: fixed;
top: 0px;
z-index: 1000;
padding-bottom: 2px;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
}
@media screen and (min-width: 40em) {
#nav li {
width: 16.6%;
*width: 24.9%; /* IE7 Hack */
_width: 19%; /* IE6 Hack */
}
}