How To Create a Responsive Navbar Using HTML & CSS | Step By Step Tutorial

Поделиться
HTML-код
  • Опубликовано: 7 фев 2025

Комментарии • 291

  • @webdevcreative
    @webdevcreative  Год назад +36

    All source code: patreon.com/webdevcreative

    • @mokangibwalo8480
      @mokangibwalo8480 Год назад +1

      merci

    • @Blacknarrates
      @Blacknarrates Год назад +10

      I’ve worked on mine and it’s working
      If you need the code I can share with you.
      Just reply. Thank you 👍

    • @rakeshgowda6187
      @rakeshgowda6187 Год назад

      @@Blacknarrates please share

    • @theraveinformed
      @theraveinformed Год назад

      @@Blacknarrates thank you

    • @danieledomani
      @danieledomani Год назад

      @webdevcreative the link is not opening

  • @ohoLee
    @ohoLee 10 месяцев назад +1

    Thank you so much for this detailed complete video. You explained everything about mobile dropdown responsiveness here. Thanks alot. God bless you.

  • @moonomanda4266
    @moonomanda4266 Год назад +14

    I've been struggling with creative a functional navbar, thanks alot for this video 😭🙏

  • @peaklegacy146
    @peaklegacy146 Год назад +7

    The layout looks great but all of the shortcuts I learned from this astound me! Instant Sub!

  • @jannathanielausan4671
    @jannathanielausan4671 Год назад +24

    If you guys are having trouble with the toggle not showing, try minimizing your window. If you see the three lines after doing that then congrats you followed well! Now to fix this issue, the solution I found was to adjust the max width from the line that has @media from 992 to a higher number, btw mine worked at 2000px.

    • @johnexplorations272
      @johnexplorations272 Год назад +1

      Mine Worked When I Removed The 'Overflow:Hidden' Attribute

    • @kbreditz3145
      @kbreditz3145 Год назад

      ​@@johnexplorations272 mine also work but when I reload it automatically open

    • @Marieswaran_17
      @Marieswaran_17 Год назад

      I followed right and put the right syntax but My media query does not working what would I do

    • @johnexplorations272
      @johnexplorations272 Год назад

      ​@@Marieswaran_17 In your code, add this script:
      window.addEventListener("DOMContentLoaded",function(){
      alert("Window width:" + window.innerWidth");
      alert("Window height:" + window.innerHeight);
      }
      also, try adding this meta:
      your code wont work if the meta tag is not added, so take care of that.
      Edit: This occured to me too when i was learning programming, and happens usually with a lot of programmers. Just make sure you check the syntax again

    • @enesstasoglu
      @enesstasoglu Год назад

      It worked. ty

  • @desilvas1559
    @desilvas1559 Год назад +3

    the best video I have ever seen for the responsiveness of the website. in fact this the video which gave me the complete understanding of the responsiveness . thank you so much great work do More

  • @kb5140
    @kb5140 Год назад +19

    Great video. Had no voice over but still explained everything flawlessly

  • @SoJinnie23
    @SoJinnie23 Год назад +2

    Best! I use your videos for learning. Perfect, I understand everything without your explanation/speaking. I learn a lot, thanks to you 😊😊😊😊

  • @highperkz3967
    @highperkz3967 23 дня назад

    This was unbelievably helpful, thanks!

  • @user-zi5kl4dq6s
    @user-zi5kl4dq6s 9 месяцев назад +1

    Thank you, your video helped me so much to finish my work. I'm so grateful.

  • @TylerIngram
    @TylerIngram Год назад

    I appreciate the tutorial (even if it's not voiced over)
    I incorporated it into my little React project

  • @iareplaying
    @iareplaying Год назад +10

    Hey! Awesome work and thank you very much! I adjusted dropdown menu to suit my project and your tutorial helped a ton. I am having a bit of trouble with toggling an xmark, any other icon for that matter. Xmark apparently isn't included in font awesome 5 free so I tried with other icons but nothing works! Still have the good ol bars so not really an issue.

  • @AlonePhilic
    @AlonePhilic Год назад +4

    It was a nice and clean video. Even without a voiceover, you made us understand everything. Thank you for creating this clean and great video.

  • @Mr_mofit
    @Mr_mofit 4 месяца назад

    Thank you for the helpful lesson you shared, my dear friend. Wishing you success!

  • @juanrey922
    @juanrey922 Год назад +1

    pocos minutos hiciste eso. eres un crack. nuevo suscriptor

  • @goodnessmaikoto5088
    @goodnessmaikoto5088 Год назад +4

    This is amazing, although I would like to make a suggestion, do you think it’s possible you input speech as you code? Just for more clarity and gives you the time to explain certain things, big love and a nice one. 👏🏽

  • @lethe_yoon
    @lethe_yoon Год назад +7

    Thank you for the excellent video! By the way I have a question. Is there any specific reason of using , instead of tag? I presumed that would fit semantics better than . I am a beginner , so any informative comments would be highly appreciated! Thank you sir!

    • @laalchi_gamer
      @laalchi_gamer Год назад +4

      There is no reason for the should have a class of 'navbar'. you can also use tag with a class of "navbar". btw using a tag itself for designing can be overwritten by its priority order. since class have higher priority than tagname

  • @UnKnown-ur9fq
    @UnKnown-ur9fq Год назад +2

    ooh, it's so cute to see clean html after working with React and Next.js for a long time.. it's like playing on an old 8bit Dendy🥰😍😍😍 there are no functions, states and props here - i love it!

  • @JCPMBENG
    @JCPMBENG Год назад +1

    i love the design

  • @Debjit_Adhikari
    @Debjit_Adhikari Год назад

    Thank you. It was so simple to understand.

  • @the_ansariii
    @the_ansariii 11 месяцев назад

    Awesome video it really helped me 🚀👌

  • @iamAbhi09
    @iamAbhi09 Год назад +4

    Fabulous tutorial bro❤️❤️
    I love it very much ❣️

  • @mrx4256
    @mrx4256 Год назад +2

    brilliant videos...Thank you so much❤ Subscribed!

  • @asiimwecalvin6893
    @asiimwecalvin6893 Год назад

    This is a great saver...Thank you soo much.

  • @hollymayvestveit9854
    @hollymayvestveit9854 Год назад +5

    ive wrote the exact same thing as you but when i copy the bar in to the code it doesnt show up? youre relly great and i would love for this to work!

    • @gavonskates6689
      @gavonskates6689 Год назад +1

      same thing happened to me, did u find a fix?

    • @AtharvaVirpe27
      @AtharvaVirpe27 Год назад +1

      I changed few things of font-awesome and it works fine for me ,
      I used this rel link : cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css
      then for bars use class = "fa fa-bars" ,
      for cross/xmark use class = "fa fa-times" .
      I hope this will help you☺

  • @holiwis243
    @holiwis243 Год назад +2

    I have a question, is it necessary to add a bg-color if bg-image covers the whole screen? Why did he did like that?

  • @mohadesh8190
    @mohadesh8190 5 месяцев назад

    thanks. this video was so useful for me❤

  • @hungoan7699
    @hungoan7699 Год назад +2

    Actually it's beautiful because it has a pretty picture

  • @lokeshbhardwaj2043
    @lokeshbhardwaj2043 Год назад

    good one

  • @portfedh
    @portfedh Год назад

    This was great! Thank you!

  • @Cambridge478
    @Cambridge478 9 месяцев назад

    Thank you so much your video helped me a lot :)

  • @jacksonday6737
    @jacksonday6737 2 месяца назад

    6:55 missing the `s` at the end of 0.2 here for the transition to work. Great video though :)

  • @MistroMix
    @MistroMix 3 месяца назад

    Thanks ❤ my friend

  • @BomToxhall
    @BomToxhall Год назад

    Such a simple design to follow along with, thanks a bunch!

  • @kali89-n7n
    @kali89-n7n Год назад

    Thank you for sharing this video.

  • @steec3100
    @steec3100 Год назад

    Hey! Great video as always 😁 I was just wondering, what web browser do you use?

  • @facundocruz8133
    @facundocruz8133 Год назад +1

    awesome! 😁😁

  • @aamonackerman8707
    @aamonackerman8707 Год назад

    The Background Music Is So Immersive

    • @Digmen1
      @Digmen1 4 месяца назад

      The background music is so annoying

  • @HuyenNguyen-yq6wi
    @HuyenNguyen-yq6wi Год назад

    wowwwwww great

  • @williamkakooza4603
    @williamkakooza4603 Год назад

    Thank you so much🙏

  • @reeceslade4145
    @reeceslade4145 Год назад

    Great Video

  • @Иван-э5м5л
    @Иван-э5м5л Год назад +1

    Good job. Nice design

  • @kinglucky5122
    @kinglucky5122 Год назад

    Thank you for creating this great video. ❣

  • @sandra1761
    @sandra1761 Год назад +1

    Good stuff, thanks a bunch!

  • @ahmedghallab5342
    @ahmedghallab5342 11 месяцев назад

    شكرا Thanks it was helpful

  • @ictlab1032
    @ictlab1032 Год назад

    awesome 🥰

  • @rhonoz1175
    @rhonoz1175 Год назад +2

    Great tutorial, thanks!

  • @Rodrigo-nx4fg
    @Rodrigo-nx4fg 2 месяца назад

    Youre not following the DRY principle, youre repeating the menu text links, so when you need to update it, you must it do it twice. Also when using the position:absolute, you are using rem and px units.

  • @miruna-alexandraagopian6402
    @miruna-alexandraagopian6402 3 месяца назад

    Thank you a lot for this treasure of a video! Really well explained and so easy to follow!
    How could we expand you JS code so that when someone clicks a link in the mobile navbar, the navbar closes automatically after the link being clicked?

  • @Filmgraphix_studios
    @Filmgraphix_studios Год назад +2

    this is great work although my drop down is not working even after using your code from git hub..kindly assist

  • @thawthaw1001
    @thawthaw1001 Год назад +1

    Thz bro this is so easy n very nice ilysm

  • @shikharsharma213
    @shikharsharma213 9 месяцев назад

    Thank you very much !!

  • @eagleman98
    @eagleman98 22 дня назад

    So the phone size part wasn't working and after about an hour of going over and over the code, it was just a missing comma...

  • @kingannun9742
    @kingannun9742 Год назад +1

    awesome

    • @kingannun9742
      @kingannun9742 Год назад

      intenté hacerlo para una página mía pero no quedó igual

  • @jawidmusic.7ce
    @jawidmusic.7ce Год назад +1

    Marvelous

  • @BidhaN...
    @BidhaN... Год назад

    So satisfaction 😊

  • @aminashahid2818
    @aminashahid2818 Год назад

    this tutorial is really helpful 😍Thanks🌼

  • @Iollipop87
    @Iollipop87 Год назад

    I was like "no way he's gonna make a responsive hamburger menu without js" (cus you say html and css in the title) but then entered js xD

  • @AgrajDubey7
    @AgrajDubey7 Год назад

    Wow such a beautiful and simple follow along tutorial. Keep on bringing quality content, you have our support 💝
    Btw which background music did u use in this video??

  • @fulgorth2661
    @fulgorth2661 8 месяцев назад

    The title is incorrect. Either it is not a step by step or you have to write: "... Using HTML & CSS & cdnjs ...". But its helpful for most I guess.

  • @yeamlak12
    @yeamlak12 4 месяца назад +2

    I did all things as shown but the java script phase doesn't work😭😭😭😭

  • @badiTeyeb4771
    @badiTeyeb4771 Год назад

    Good❤

  • @marcosromanfernandez3760
    @marcosromanfernandez3760 Год назад

    Thanks❤

  • @CodesHub6784
    @CodesHub6784 Год назад +1

    My bars are not showing, I've reduced the size of the screen, increased max width still not showing help!!

  • @kazouilles
    @kazouilles 6 месяцев назад +1

    for me the javascript doesn't work, the menu doesn't appear when i click

  • @InfoFusion_Hub
    @InfoFusion_Hub Год назад

    Thank you so much

  • @vijaypandit17
    @vijaypandit17 2 года назад +1

    very helpfull

    • @webdevcreative
      @webdevcreative  2 года назад +1

      Glad to hear that

    • @mrak870
      @mrak870 Год назад

      Realy bro its helpfully in my project i just include this instruction thanks❤️

  • @fubaradickson497
    @fubaradickson497 8 месяцев назад

    Thanks Chief

  • @myfreeuse
    @myfreeuse 4 месяца назад

    thanks for this

  • @ALi-Sloom
    @ALi-Sloom Год назад

    Thanks!

  • @GabrielJackson-t9l
    @GabrielJackson-t9l Год назад

    cool video)

  • @fredlaurent32
    @fredlaurent32 2 года назад

    Bravo nice job

  • @Dragon-facts-d3j
    @Dragon-facts-d3j Год назад

    well done man!

  • @sam-of7de
    @sam-of7de Год назад

    thanks mine worked perfect

  • @Lieutenantsab
    @Lieutenantsab Год назад

    Thanku ❤

  • @chouaibchouaib4819
    @chouaibchouaib4819 Год назад +1

    thank u ❤

  • @prometheusreign5424
    @prometheusreign5424 Год назад

    Thank you.

  • @jorgeivanmonterrosanarvaez9169

    Thanks so much

  • @jaazielcrb
    @jaazielcrb Год назад

    Thanks man!

  • @44aliano
    @44aliano Год назад

    Thank you brother

  • @amsalghur9109
    @amsalghur9109 Год назад

    Hello Web Dev Creative,
    is it possible to have logo on center and links on left and the button on right side in the navbar if this does possible recommend some videos or just me here because I am struck to learn my how to make responsive navbar sorry bothering you. please let me know.

  • @annafeledi7909
    @annafeledi7909 Год назад

    thank you!!

  • @oztsen6472
    @oztsen6472 2 года назад +10

    bro my toggle navbar doesnt work can u help me please?

    • @souhaila1202
      @souhaila1202 2 года назад

      propably you put 'quarySelector' instead of 'querySelector'

    • @souhaila1202
      @souhaila1202 2 года назад

      toggle is workung for me

    • @OdambsTech2020
      @OdambsTech2020 2 года назад +1

      My is not working

    • @mariaeduardabueno862
      @mariaeduardabueno862 Год назад

      mine wasnt too but then i realised i had typed "classlist" with a lowercased L instead of "classList" .
      subtle mistake.

    • @Crime_pays
      @Crime_pays Год назад

      @@souhaila1202 lol

  • @Hs-iq3yr
    @Hs-iq3yr 10 месяцев назад

    cann i add my self the js code?

  • @poojansolanki9850
    @poojansolanki9850 Год назад +1

    What music is this? i loved it..

  • @mercy6520
    @mercy6520 Год назад

    Bro, what is your theme extension?

  • @andyl9920
    @andyl9920 3 месяца назад

    great job, but sadly we needed a little JS. Got me confused in the end there. I guess there is no such thing as pure html and css for the hamburger menu.....

  • @osvaldoandrade_arquitecto
    @osvaldoandrade_arquitecto Год назад

    Why create a div classed as navbar when you cab use navbar tag? Can you please explain?

    • @kja6336
      @kja6336 Год назад

      a class has precedence over a tagname

  • @qkamil7481
    @qkamil7481 2 года назад

    very helpful thanks

  • @teckwithyou8421
    @teckwithyou8421 Год назад

    where you learnt html css js ?

  • @agusarianto7484
    @agusarianto7484 Год назад

    thanks bro

  • @jashleylapuz6167
    @jashleylapuz6167 10 месяцев назад

    Idk whats wrong i copied all the code but Get started in the dropdown wont show pls help

  • @piisale
    @piisale Год назад +1

    The title of the video says HTML and CSS yet there’s also JavaScript. Is it even possible to do A hamburger menu without JS.?

  • @thrishank
    @thrishank Год назад +3

    Hey my dropdown menu is not opening when clicking the toggle button. Can anyone help me out.

    • @hiimfelldev
      @hiimfelldev Год назад

      instead using .onClick in script function, try this function:
      toggleBtn.addEventListener('click', () => {
      dropDownMenu.classList.toggle('open');
      }

    • @marcellszucs2225
      @marcellszucs2225 Год назад

      mine too, did you get it?

    • @sekuchu
      @sekuchu Год назад +2

      If you followed his tutorial completely, at the java script part, it wouldnt work for me but when I changed the .toggle_button in the script to the mentioned .toggle-button in both cases, it fixed it.

    • @sekuchu
      @sekuchu Год назад

      ​@@marcellszucs2225 yis

    • @Tenku97
      @Tenku97 Год назад

      @@sekuchu this saves me! thank you so much!

  • @Moralbr-
    @Moralbr- Год назад +3

    Muito TOP \o/

    • @lucascavalcanti2784
      @lucascavalcanti2784 Год назад

      Mano. Vê se consegue me ajudar. Eu fiz todo esse tutorial, mas quando deixo o dropdown_menu ativado com 992px e aumento pra 993, o botão Get Started aparece mas o dropdown não some. Ai fico com o botão Get Started na tela e o dropdown ativado também. Sabe onde estou errando?

  • @mr.joker3990
    @mr.joker3990 2 года назад +1

    How you resize the background image? how it is responsive?

    • @webdevcreative
      @webdevcreative  2 года назад +7

      Thanks for your comment and for your interest in my video! To make the background image responsive, I used CSS to set the background position to center and the background size to cover. This allows the image to scale up or down depending on the size of the screen while keeping it centered. I hope that helps! Let me know if you have any other questions.

  • @XAKER_450
    @XAKER_450 Месяц назад

    navbar ishlamadiku display flex ishlamadi

  • @Sixandout07
    @Sixandout07 9 месяцев назад

    All set but the toggle button not working properly

  • @ganeshgupta9692
    @ganeshgupta9692 Год назад

    I m sleeping 😌😴 because of good 🎵 in background 😃 LMAO 😂

  • @guerreroHTRUJILLO
    @guerreroHTRUJILLO 9 месяцев назад

    Can someone share the final index.html and style.css I've trouble with the toggle button, for some reason is not working to me, I want to check where I messed up.