Skip to content

Commit bacbf0f

Browse files
committed
responsive top menu
1 parent 85e9f81 commit bacbf0f

File tree

4 files changed

+59
-11
lines changed

4 files changed

+59
-11
lines changed

css/stylesheet.css

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ nav {
109109
padding: 0 16px;
110110
}
111111

112+
nav > * {
113+
height: 28px;
114+
}
115+
112116
nav h3 {
113117
display: inline;
114118
}
@@ -122,8 +126,10 @@ nav h3 {
122126
}
123127

124128
.top-menu-buttons {
125-
float: right;
126-
height: 100%;
129+
position: absolute;
130+
top: 0;
131+
right: 0;
132+
padding: 0 16px;
127133
}
128134

129135
#shared {
@@ -139,8 +145,12 @@ nav h3 {
139145
text-align: right;
140146
}
141147

142-
.sidemenu {
148+
.sidemenu,
149+
.workspace {
143150
top: 30px;
151+
}
152+
153+
.sidemenu {
144154
right: 85%;
145155
visibility: hidden;
146156
overflow: scroll;
@@ -213,7 +223,6 @@ nav h3 {
213223

214224
.workspace {
215225
position: absolute;
216-
top: 30px;
217226
bottom: 0;
218227
left: 15%;
219228
right: 0;
@@ -625,3 +634,19 @@ input[type=number]::-webkit-outer-spin-button {
625634
border-left: none;
626635
border-bottom: none;
627636
}
637+
638+
@media (max-width: 1024px) {
639+
.sidemenu,
640+
.workspace {
641+
top: 60px;
642+
}
643+
644+
nav {
645+
height: 60px;
646+
}
647+
648+
.top-menu-buttons {
649+
top: 30px;
650+
left: 0;
651+
}
652+
}

index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
<nav>
2424
<button id="navigation">
2525
<h3>
26-
Algorithm Visualizer
27-
<i class="fa fa-angle-right nav-arrow" aria-hidden="true"></i>
2826
<span id="category"></span>
2927
<i class="fa fa-angle-right nav-arrow" aria-hidden="true"></i>
3028
<span id="algorithm"></span>

public/algorithm_visualizer.css

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ nav {
229229
padding: 0 16px;
230230
}
231231

232+
nav > * {
233+
height: 28px;
234+
}
235+
232236
nav h3 {
233237
display: inline;
234238
}
@@ -242,8 +246,10 @@ nav h3 {
242246
}
243247

244248
.top-menu-buttons {
245-
float: right;
246-
height: 100%;
249+
position: absolute;
250+
top: 0;
251+
right: 0;
252+
padding: 0 16px;
247253
}
248254

249255
#shared {
@@ -259,8 +265,12 @@ nav h3 {
259265
text-align: right;
260266
}
261267

262-
.sidemenu {
268+
.sidemenu,
269+
.workspace {
263270
top: 30px;
271+
}
272+
273+
.sidemenu {
264274
right: 85%;
265275
visibility: hidden;
266276
overflow: scroll;
@@ -333,7 +343,6 @@ nav h3 {
333343

334344
.workspace {
335345
position: absolute;
336-
top: 30px;
337346
bottom: 0;
338347
left: 15%;
339348
right: 0;
@@ -769,3 +778,19 @@ input[type=number]::-webkit-outer-spin-button {
769778
border-left: none;
770779
border-bottom: none;
771780
}
781+
782+
@media (max-width: 1024px) {
783+
.sidemenu,
784+
.workspace {
785+
top: 60px;
786+
}
787+
788+
nav {
789+
height: 60px;
790+
}
791+
792+
.top-menu-buttons {
793+
top: 30px;
794+
left: 0;
795+
}
796+
}

public/algorithm_visualizer.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy