Build a Slide out Hamburger Menu with HTML, CSS & JavaScript

  Рет қаралды 112,754

Tyler Potts

Tyler Potts

3 жыл бұрын

Learn how to build a slide-out hamburger menu using HTML, CSS and JavaScript. We utilise the previous video code and implement the new slide out navigation menu and hamburger button to create a fully working mobile navigation menu.
Previous Video: • Build a Responsive SPA...
Source Code: github.com/TylerPottsDev/SPA-...
// JOIN MY DISCORD
/ discord
// Support me on Ko-Fi
ko-fi.com/tylerpotts
// FOLLOW ME ON TWITTER
/ tyler_potts_
// BECOME A MEMBER
kzbin.infojoin
// MY GEAR FOR CODING AND KZbin
Blue Yeti Microphone: amzn.to/3jr3l7T
Microphone Stand: amzn.to/35B9LMN
Chair: amzn.to/3dWds3F
Thunderbolt Dock: amzn.to/3osBF6u
Monitor: amzn.to/37I8KoR
All of these products I own and have tested!
// INTERESTED IN GAME DEV?
Game development channel: / muddywolf
// CHECK OUT MY GAME
play.google.com/store/apps/de...
// DO THESE SIMPLE STEPS
LIKE, SUBSCRIBE & SHARE

Пікірлер: 113
@utkarshverma3314
@utkarshverma3314 Жыл бұрын
by far the best and the most simplest way of creating a slide-out nav menu thank you so so much!!!
@TylerPotts
@TylerPotts Жыл бұрын
Glad it helped!
@wiNtersPista
@wiNtersPista 2 жыл бұрын
Dude, best tutorial in responsive navbars!
@catiaoliveira6843
@catiaoliveira6843 2 жыл бұрын
Tanks for your tutorial, you saved my life at 2 a.m, just a few hours before my presentation for a jury school 🎉 😍 👏🏼
@TylerPotts
@TylerPotts 2 жыл бұрын
Glad I could help!
@asafrushiti5913
@asafrushiti5913 2 жыл бұрын
One of the best tutorial I found in YT
@TylerPotts
@TylerPotts 2 жыл бұрын
Wow, thanks!
@johnnydeymisson1842
@johnnydeymisson1842 3 жыл бұрын
Thank you tylerr, hugs from Brazil ♥
@sh9vch9nk0
@sh9vch9nk0 11 ай бұрын
Thank you for this video, helped me a lot! Very useful and clear explanation 👍🤓
@hardwired89
@hardwired89 3 жыл бұрын
Thank you tylerr ,❤️❤️❤️ this javascript features
@Blue_Pumpkin
@Blue_Pumpkin 7 ай бұрын
Thank you. So easy to do.
@getsturdy
@getsturdy 2 жыл бұрын
Me: writes down code Him: "no, actually im gonna...." Me: deletes the code
@mooseydev
@mooseydev Жыл бұрын
Concise. Thank you!
@TylerPotts
@TylerPotts Жыл бұрын
Glad it was helpful!
@knwr
@knwr Жыл бұрын
Very nice video. I looked around at a few and decided on this one to follow. Word of advice: when transforming the hamburger to an 'X', the translate operation is tough to work with because you are calling it after the rotation, so the translation axis rotates as well. These functions work in sequence, so it is easier and better results are achieved if you call the 'translate()' function first. The resulting code is simpler as well: .hamburger.is-active, .hamburger:before { transform: translate(0px, 11px) rotate(-45deg) ; } .hamburger.is-active, .hamburger:after { transform: translate(0px, -11px) rotate(45deg) ; }
@user-yp1su8ye6z
@user-yp1su8ye6z 5 ай бұрын
Thank you for this ! :)
@randommosta2489
@randommosta2489 3 жыл бұрын
100% clean operation
@otepbergenovamadina6285
@otepbergenovamadina6285 3 жыл бұрын
thank you) this is awesome))
@burgasdragonheirsilentgods
@burgasdragonheirsilentgods 3 жыл бұрын
Very nice video and example ! Great work and presentation again !
@TylerPotts
@TylerPotts 3 жыл бұрын
Thank you! Cheers!
@mareksamofal3929
@mareksamofal3929 6 ай бұрын
thank you!
@aleksandarrasic4204
@aleksandarrasic4204 Жыл бұрын
GOSHHHHH u r amazing my friend. Well done !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@TylerPotts
@TylerPotts Жыл бұрын
Thank you! Cheers!
@felixsowah8209
@felixsowah8209 Жыл бұрын
Thank you very much.👍 great work
@TylerPotts
@TylerPotts Жыл бұрын
Thanks for watching, Felix!
@gunjanpatil5692
@gunjanpatil5692 3 жыл бұрын
after giving postion: fixed; to the menu, my nav-links are not working??
@I1Ido.
@I1Ido. Жыл бұрын
i recommend using font-awesome for the bars!
@ObjectiveRealityIsKing
@ObjectiveRealityIsKing 7 ай бұрын
Great video, thanks for sharing
@Jrizy.
@Jrizy. 22 күн бұрын
I know this is an older video, but I really like that theme. Does anyone know which one it is or is it custom?
@priyadharshinimuthukumar8970
@priyadharshinimuthukumar8970 8 ай бұрын
Thanks a lot sir...its really helped me to develop my website
@CaddekPhotos
@CaddekPhotos 7 ай бұрын
Question: How come my values on translates differs from yours? Does that have to do with the container and how that is styled combined with the position in the container? :)
@vinzanity68
@vinzanity68 7 ай бұрын
fascinating. thank you!
@TylerPotts
@TylerPotts 7 ай бұрын
Glad you enjoyed it!
@omarruiz5423
@omarruiz5423 4 ай бұрын
After the menu buttons are clicked, does the menu slide back in?
@minademian
@minademian Жыл бұрын
Great video, thanks!
@TylerPotts
@TylerPotts Жыл бұрын
Glad you liked it!
@gnomocoder2068
@gnomocoder2068 Жыл бұрын
You Are The Boss!
@skolotoi4588
@skolotoi4588 Жыл бұрын
awesome !! thank you
@TylerPotts
@TylerPotts Жыл бұрын
You're welcome!
@stvnk1m
@stvnk1m Жыл бұрын
Thanks for tip!
@bl7937
@bl7937 2 жыл бұрын
Thank you for the tutorial. I'm a bit confused though as to why you would create a secondary nav tag below the header tag. Look at video time line 9:15. Can you explain why you did it that way?
@balkarangrewal3646
@balkarangrewal3646 2 жыл бұрын
It is for the desktop view.
@nox2sweet
@nox2sweet Жыл бұрын
Thanks!
@whyisthiscodenotworking
@whyisthiscodenotworking 7 ай бұрын
thanks ! for the video loved it
@TylerPotts
@TylerPotts 7 ай бұрын
Glad you liked it!
@tipografico4477
@tipografico4477 2 жыл бұрын
how to add a slider on section banner in this code?
@connerdassen7808
@connerdassen7808 11 ай бұрын
The three bars of the hamburger menu are stacked on top of each other no matter what, increasing the margin just moves them down
@abiatama
@abiatama 11 ай бұрын
why my bars of the hamburger menu are stacked on top?? any solution?
@bazeArttutorials
@bazeArttutorials 5 ай бұрын
good day, after applying you code, when i click on the hamburger it toggles open, but when i click on it the second time it doesnt close the menu, why is this sir?
@rangabharath4253
@rangabharath4253 3 жыл бұрын
Awesome
@moksh_plays5658
@moksh_plays5658 Ай бұрын
thank your sir helps me a lot❤
@TylerPotts
@TylerPotts Ай бұрын
Glad to hear that
@ojoyemivhick4772
@ojoyemivhick4772 Ай бұрын
@@TylerPottsGood day Tyler, I recently made use if your tutorial video for the vue js voice recognition application , it records and stuff, but doesn’t show text on screen
@I1Ido.
@I1Ido. Жыл бұрын
actually you can't hover in mobile but you can by clicking it.
@mikesalinas6245
@mikesalinas6245 3 ай бұрын
Esta chignon el sitio web, lo usare para mi trabajo... haber que tal queda.... gracias!!
@lance740
@lance740 10 ай бұрын
Great video
@total.telugu5503
@total.telugu5503 3 жыл бұрын
hello your explaination is simply superb
@TylerPotts
@TylerPotts 3 жыл бұрын
Thanks!
@danielfernandezjaime5014
@danielfernandezjaime5014 7 ай бұрын
THANK U!!!!!!!!!!!!!!!!!!!!!!!!!
@hamdikurdi
@hamdikurdi Жыл бұрын
Hello, your vscode setup is really cool . Can you share it?
@Imran-Desk
@Imran-Desk 2 жыл бұрын
Thank you big bro
@TylerPotts
@TylerPotts 2 жыл бұрын
You're welcome!
@joeyywill1234
@joeyywill1234 3 жыл бұрын
thanks dad xx
@fplfpl7890
@fplfpl7890 3 жыл бұрын
how to enable this option to show the time when I was on a given line of code?
@dontbetoxic4387
@dontbetoxic4387 3 жыл бұрын
git
@Indischolar_yt
@Indischolar_yt Жыл бұрын
Thanks for the video, but i'm stuck here at the end. If I click a button in mobile nav menu, it don't take me anywhere. I think the navbar should go beck in the it should take me where I want.
@Bastian6071
@Bastian6071 Жыл бұрын
same for me. Have you found a solution yet?
@samrad6508
@samrad6508 Жыл бұрын
how is your logo and hamburger are still showing after you fully give the .mobile-nav a 100% height and width ??
@ChromaticaCitizen
@ChromaticaCitizen Жыл бұрын
Yeah I was confused about that too! Mine gets completely blocked.
@sauleRK
@sauleRK 2 жыл бұрын
can anyone tell me what did i do wrong? my hamburger menu works just fine, all the animations works... however there's no X sign when the menu is opened where could my mistake be?
@TylerPotts
@TylerPotts 2 жыл бұрын
Hey, Sauler. Sorry for that, I'm not sure how to help but if you want to join my discord I'm sure someone will be able to assist you! There's so many awesome friendly devs who help eachother out :D
@monicagarcia2592
@monicagarcia2592 2 жыл бұрын
I'm having the same issue, did you ever find the solution for this?
@Fkamynk
@Fkamynk 2 жыл бұрын
@@monicagarcia2592 I had the same issue but then I realized it's because the X was behind the mobile nav. You have to add a higher z-index than the mobile nav and set the position to relative on the ".hamburger.is-active:after " selection in CSS. So the code would be this: .hamburger.is-active:after { transform: rotate(50deg) translate(-3px, 2px); position: relative; z-index: 100; } .mobile-nav { position: fixed; z-index: 98; } I hope that helps 😄
@monicagarcia2592
@monicagarcia2592 2 жыл бұрын
@@Fkamynk Thank you SO much. I'm going to give this a try. Really appreciate you replying, i was going crazy trying to figure it out
@Fkamynk
@Fkamynk 2 жыл бұрын
@@monicagarcia2592 lmaoo same!
@AKSHATmadan_
@AKSHATmadan_ Жыл бұрын
im trying to make this in react but not working 😓
@fitradical
@fitradical 3 жыл бұрын
Niceeee
@TylerPotts
@TylerPotts 3 жыл бұрын
Thanks 🤗
@ksriharsha2911
@ksriharsha2911 3 жыл бұрын
🔥❤️🔥❤️
@knightingirl
@knightingirl 3 жыл бұрын
Hi, thanks for the video Why did you use *.hamburger:after* and *.hamburger:before* , why not *.bar:after* and *.bar:before* instead?
@ankishkhandelwal7588
@ankishkhandelwal7588 2 жыл бұрын
so you see in .hamburger the content is .bar to get three lines and in .bar their is no content means if we give .bar::after and .bar::before this will give only two lines may be that,s the reason
@letsplat__
@letsplat__ Жыл бұрын
What VS Code Theme are you using?>
@raptorvenom7983
@raptorvenom7983 Жыл бұрын
It's Synthwave'84
@ShivamKumar-vd1rb
@ShivamKumar-vd1rb 4 ай бұрын
why don't we use font-awesome for hamburger menu
@jakeochukoidamatie723
@jakeochukoidamatie723 2 жыл бұрын
followed every step to 8:47min and my hamburger doesn't transform, i don't know what could be wrong, someone please help.
@daedalus5070
@daedalus5070 2 жыл бұрын
Yep had the same issue and its one of two things: - Having the hamburger/cross as a button can add a "navigable" class by default so even though the JS is correct, the css never kicks in because the button becomes: ".hamburger .navigable .is-active" - 2nd can be hard to spot and sometimes easy to forget: .querySelector uses the css style class wheras 'toggle' doesnt. I had accidentally added ".is-active" instead of just "is-active" in the toggle. Hope that helps!
@HayWhy_Pappy
@HayWhy_Pappy Жыл бұрын
@@daedalus5070 still doesn't fix it for me. What could be the problem
@HayWhy_Pappy
@HayWhy_Pappy Жыл бұрын
Hey. How did you fix it ?
@timifalode5152
@timifalode5152 Жыл бұрын
Pls zoom in on the IDE next time, twas too tiny to watch
@cjsport1254
@cjsport1254 Жыл бұрын
I didn’t catch an explanation on ‘is-scrolling’
@samrad6508
@samrad6508 Жыл бұрын
10:49
@yuriyzadorozhnyi3849
@yuriyzadorozhnyi3849 Жыл бұрын
Привіт з України ! Дякую тобі друже ! Thanks a lot ! Awesome !!
@ethanq2648
@ethanq2648 Жыл бұрын
6:28 the code for the burger
@one9959
@one9959 Жыл бұрын
It has copyright, or can i use It if i make modifications for My website ?
@Bastian6071
@Bastian6071 Жыл бұрын
It's code. Code has no copyright
@one9959
@one9959 Жыл бұрын
@@Bastian6071 ok , i just wanted to use It on My website
@Bastian6071
@Bastian6071 Жыл бұрын
@@one9959 yeah you can do so
@cryptomjkjx4991
@cryptomjkjx4991 3 жыл бұрын
My mind was blown....holy shit I didn't you could do that this easily......I was fucking around with if statements when all I could do is classList.toggle. Also that is-active class damn thank you for this video
@programmerrdai
@programmerrdai 3 жыл бұрын
2nd
@sandyrbierid3603
@sandyrbierid3603 3 жыл бұрын
Very happy 😍💋 💝💖♥️❤️
@AllanOrtegren
@AllanOrtegren 5 ай бұрын
Where is the indian accent >:(
@julianttaneok6390
@julianttaneok6390 3 жыл бұрын
I'm Single 😍😥
@mike4680
@mike4680 3 жыл бұрын
I thought you were Julian.
@Anonymous-bhai420
@Anonymous-bhai420 9 ай бұрын
your accent is so much confusing😑
@zachfenton608
@zachfenton608 Жыл бұрын
Awesome
Build Tic-Tac-Toe in JavaScript, HTML & CSS
29:24
Tyler Potts
Рет қаралды 8 М.
How to create a Responsive Navigation Bar (for beginners)
15:21
Coding2GO
Рет қаралды 337 М.
Heartwarming moment as priest rescues ceremony with kindness #shorts
00:33
Fabiosa Best Lifehacks
Рет қаралды 38 МЛН
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 167 МЛН
New model rc bird unboxing and testing
00:10
Ruhul Shorts
Рет қаралды 24 МЛН
How to build an accessible hamburger menu with HTML, SCSS & JS
13:25
Responsive Navigation Bar Tutorial | HTML CSS JAVASCRIPT
35:05
developedbyed
Рет қаралды 1,4 МЛН
How I Coded An Entire Website Using ChatGPT
18:22
Nick White
Рет қаралды 1,9 МЛН
Subtle, yet Beautiful Scroll Animations
5:04
Beyond Fireship
Рет қаралды 1,6 МЛН
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 927 М.
Smooth Back To Top Button - CSS Effects
8:54
Tyler Potts
Рет қаралды 10 М.
Heartwarming moment as priest rescues ceremony with kindness #shorts
00:33
Fabiosa Best Lifehacks
Рет қаралды 38 МЛН