Skip to content

Commit fa39de5

Browse files
committed
add mobile nav menu for formatting
1 parent f9fa7c6 commit fa39de5

File tree

1 file changed

+130
-2
lines changed

1 file changed

+130
-2
lines changed

formapi/css/style.css

Lines changed: 130 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ body {
4646
}
4747

4848
@font-face {
49-
font-family: 'MPLUSRounded1c-Regular', sans-serif;
49+
font-family: 'MPLUSRounded1c-Regular';
5050
src: url(../fonts/MPLUSRounded1c-Regular.ttf);
5151
}
5252

5353
@font-face {
54-
font-family: 'MPLUSRounded1c-ExtraBold', sans-serif;
54+
font-family: 'MPLUSRounded1c-ExtraBold';
5555
src: url(../fonts/MPLUSRounded1c-ExtraBold.ttf);
5656
}
5757
/************End of Font Face Formatting************/
@@ -89,6 +89,79 @@ header h1 {
8989
border-radius: 8px;
9090
color: white;
9191
}
92+
93+
/*Format x icon*/
94+
.bx-x {
95+
padding: 10px;
96+
font-size: 7em;
97+
border: 5px solid white;
98+
border-radius: 8px;
99+
z-index: 4;
100+
color: white;
101+
}
102+
103+
/*Format nav menu*/
104+
#navMenu {
105+
position: fixed;
106+
top: 0;
107+
right: -500px;
108+
width: 500px;
109+
height: 100vh;
110+
background-image:
111+
linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), /*Create dark linear gradient*/
112+
url(../images/bannerMenu.jpg);
113+
background-size: cover;
114+
background-position: center;
115+
display: flex;
116+
flex-direction: column;
117+
justify-content: center;
118+
align-items: flex-start;
119+
transition: right 0.5s ease-in-out;
120+
z-index: 3;
121+
}
122+
123+
/*Create active nav state*/
124+
#navMenu.active {
125+
right: 0;
126+
}
127+
128+
/*Format nav menu links*/
129+
#navMenu ul {
130+
list-style-type: none;
131+
margin-left: 35px;
132+
}
133+
134+
/*Format nav menu links*/
135+
#navMenu li {
136+
margin: 30px;
137+
margin-bottom: 150px;
138+
}
139+
140+
/*Format nav menu links*/
141+
#navMenu a {
142+
color: white;
143+
text-decoration: none;
144+
font-family: monospace;
145+
font-weight: bolder;
146+
font-size: 6em;
147+
}
148+
149+
/*Create overlay for nav menu*/
150+
#overlay {
151+
position: fixed;
152+
top: 0;
153+
left: 0;
154+
width: 100%;
155+
height: 100%;
156+
background-color: rgba(0, 0, 0, 0.5);
157+
display: none;
158+
z-index: 2;
159+
}
160+
161+
/*Create active overlay state*/
162+
#overlay.active {
163+
display: block;
164+
}
92165
/************End of Header Formatting************/
93166

94167
/************Form Formatting************/
@@ -240,6 +313,61 @@ footer {
240313

241314
/**Desktop View**/
242315
@media screen and (min-width: 1300px) {
316+
/*Format nav bar*/
317+
#hamburger {
318+
display: none;
319+
}
320+
321+
/*Format nav menu*/
322+
#navMenu {
323+
position: static;
324+
width: auto;
325+
height: auto;
326+
background-color: transparent;
327+
display: flex;
328+
flex-direction: row;
329+
align-items: center;
330+
justify-content: flex-end;
331+
transition: none;
332+
background-image: none;
333+
}
334+
335+
/*Format nav menu items*/
336+
#navMenu ul {
337+
display: flex;
338+
transform: none;
339+
margin-left: 0;
340+
}
341+
342+
/*Format nav menu list*/
343+
#navMenu li {
344+
margin: 0 50px;
345+
}
346+
347+
/*Format nav menu links*/
348+
#navMenu a {
349+
font-size: 2em;
350+
transition: 0.5s ease-in;/*Create button hover effect*/
351+
background-color: #dd7973;
352+
padding: 15px;
353+
display: inline-block;
354+
width: 150px;
355+
text-align: center;
356+
border-radius: 50px;
357+
transition: 0.5s ease;/*Create hover transition*/
358+
}
359+
360+
/*Create button hover effect*/
361+
#navMenu a:hover {
362+
background: transparent;
363+
border: 2px solid #dd7973;
364+
color: #dd7973;
365+
}
366+
367+
/*Get rid of overlay*/
368+
#overlay {
369+
display: none;
370+
}
243371

244372
/*Format form tag*/
245373
form {

0 commit comments

Comments
 (0)