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

Поделиться
HTML-код
  • Опубликовано: 20 май 2024
  • #navbar #responsivenavbar #css
    In this tutorial, we will be building a responsive navbar using HTML and CSS(navigation bar in html and css). This navbar will adjust to different screen sizes, making it perfect for any website. We will be using media queries to make the navbar responsive. You will learn how to create a toggle button that opens and closes the menu, as well as how to style the menu items. This is a great project for beginners looking to improve their HTML and CSS skills. So, let's get started!
    --------------------------------------------------------------------------------
    NEW Responsive Navbar NO JS! - • How To Create a Respon...
    --------------------------------------------------------------------------------
    0:00 Intro
    0:40 HTML
    2:33 CSS
    7:15 CSS Responsive Design
    8:04 HTML Dropdown Menu
    8:28 Styling Dropdown Menu
    10:51 JavaScript
    12:38 Dropdown Menu CSS Media Queries
    13:16 HTML Hero Section
    13:30 Styling Hero Section
    -----------------------------------------------------------------------------
    Subscribe:
    -----------------------------------------------------------------------------
    Source Code: / webdevcreative
    GitHub Initial Code: github.com/webdevcreative/res...
    --------------------------------------------------------------------------------
    Love my videos? Support me by buying me a coffee. Thank you! : www.buymeacoffee.com/webdevcr...
    --------------------------------------------------------------------------------
    - How To Make Responsive Navbar with Bootstrap 5: • How To Make Responsive...
    - Responsive Fast Food Web Design Using HTML and CSS: • Responsive Fast Food W...
    - Build Illustration Style Website With Responsive Design: • Build Illustration Sty...
    - Neumorphism Music Player UI and Basic Functionality: • Neumorphism Music Play...
    - Build a Modern Website with Tailwind CSS and HTML: • Build a Modern Website...
    - Create Beautiful Toast Notifications with ReactJs: • Create Beautiful Toast...
    - Create Modern Animated Search Bars Using HTML and CSS: • Create Modern Animated...
    - Ecommerce Side Cart | Part 1/2 - Design using HTML, CSS & JavaScript: • Ecommerce Side Cart | ...
    - Ecommerce Side Cart | Part 2/2 - Functionality using HTML, CSS & JavaScript: • Ecommerce Side Cart | ...
    - Animated Menu Button Using HTML & CSS: • Animated Menu Button U...
    - How To Build a React Animated Modal 2023 (Vite, CSS-Modules, Hooks): • How To Build a React A...
    - How To Make Awesome Input Animation using HTML & CSS: • How To Make Awesome In...
    - How to Create a Modern Login Form with Responsive Design using HTML and CSS: • How to Create a Modern...
    - Simple Image Slider using HTML, CSS, and JavaScript: • Simple Image Slider us...
    -----------------------------------------------------------------------------
    Background Image: images.unsplash.com/photo-148...
    -----------------------------------------------------------------------------
    Font Awesome Cdn: cdnjs.com/libraries/font-awesome
    Font Awesome Icons: fontawesome.com/icons
    -----------------------------------------------------------------------------
    Instagram: / webdevcreative_youtube

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

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

    All source code: patreon.com/webdevcreative

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

      merci

    • @Blacknarrates
      @Blacknarrates 9 месяцев назад +7

      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 9 месяцев назад

      @@Blacknarrates please share

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

      @@Blacknarrates thank you

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

      @webdevcreative the link is not opening

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

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

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

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

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

    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

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

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

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

    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.

  • @BomToxhall
    @BomToxhall 7 месяцев назад

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

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

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

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

    pocos minutos hiciste eso. eres un crack. nuevo suscriptor

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

    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.

  • @goodnessmaikoto5088
    @goodnessmaikoto5088 11 месяцев назад +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. 👏🏽

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

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

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

    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!

  • @LilandCec
    @LilandCec 7 месяцев назад

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

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

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

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

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

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

    Great tutorial, thanks!

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

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

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

    Bravo nice job

  • @user-mm3xz3py9j
    @user-mm3xz3py9j Год назад +1

    Good job. Nice design

  • @jannathanielausan4671
    @jannathanielausan4671 11 месяцев назад +19

    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 8 месяцев назад

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

    • @kbreditz3145
      @kbreditz3145 7 месяцев назад

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

    • @marieswaranr2510
      @marieswaranr2510 7 месяцев назад

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

    • @johnexplorations272
      @johnexplorations272 7 месяцев назад

      ​@@marieswaranr2510 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 5 месяцев назад

      It worked. ty

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

    Marvelous

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

    Good stuff, thanks a bunch!

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

    Thank you for creating this great video. ❣

  • @AgrajDubey7
    @AgrajDubey7 7 месяцев назад

    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??

  • @portfedh
    @portfedh 7 месяцев назад

    This was great! Thank you!

  • @88rakibmondal59
    @88rakibmondal59 Год назад +1

    great Video bro carryon and teach us more ❤❤

  • @user-zi5kl4dq6s
    @user-zi5kl4dq6s Месяц назад

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

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

    awesome! 😁😁

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

    Thank you. It was so simple to understand.

  • @lethe_yoon
    @lethe_yoon 9 месяцев назад +5

    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!

    • @codesanskriti
      @codesanskriti 9 месяцев назад +3

      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

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

    Thz bro this is so easy n very nice ilysm

  • @JCPMBENG
    @JCPMBENG 3 месяца назад +1

    i love the design

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

    The Background Music Is So Immersive

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

    Thank you for sharing this video.

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

    thanks mine worked perfect

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

    very helpful thanks

  • @Cambridge478
    @Cambridge478 27 дней назад

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

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

    Thank you very much !!

  • @williamkakooza4603
    @williamkakooza4603 7 месяцев назад

    Thank you so much🙏

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

    Thanks❤

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

    good one

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

    thank u ❤

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

    Thanks man!

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

    So satisfaction 😊

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

    well done man!

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

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

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

    wowwwwww great

  • @jadidalmagribi
    @jadidalmagribi 14 дней назад

    Great video

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

    شكرا Thanks it was helpful

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

    Awesome video it really helped me 🚀👌

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

    Thank you so much

  • @jorgeivanmonterrosanarvaez9169

    Thanks so much

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

    Thank you.

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

    Thank you brother

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

    thank you!!

  • @ALi-Sloom
    @ALi-Sloom 10 месяцев назад

    Thanks!

  • @holiwis243
    @holiwis243 10 месяцев назад +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?

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

    Great Video

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

    this tutorial is really helpful 😍Thanks🌼

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

    Tranks bro

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

    awesome 🥰

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

    thanks bro

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

    thank you

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

    awesome

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

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

  • @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?

  • @amsalghur9109
    @amsalghur9109 7 месяцев назад

    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.

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

    very helpfull

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

      Glad to hear that

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

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

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

    Actually it's beautiful because it has a pretty picture

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

    Good❤

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

    Thanku ❤

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

    tnx

  • @SatyamKumar-vr8im
    @SatyamKumar-vr8im 2 месяца назад

    Thanks

  • @user-zq5wq9pq9u
    @user-zq5wq9pq9u 4 месяца назад

    cool video)

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

    Nice work bro

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

    This bar looking amazing and works fine. But when i minimalize the Site, the Tabs "Hero, About.." are always shown. I allready search the miss, but i dont found it.. can anyone help me please?

  • @mercy6520
    @mercy6520 7 месяцев назад

    Bro, what is your theme extension?

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

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

    What music is this? i loved it..

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

    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?

    • @AtharvaVirpe1
      @AtharvaVirpe1 11 месяцев назад +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☺

  • @guerreroHTRUJILLO
    @guerreroHTRUJILLO 28 дней назад

    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.

  • @webdevcreative
    @webdevcreative  5 месяцев назад +1

    NEW Responsive Navbar NO JS! - ruclips.net/video/JEulHItO3UI/видео.html

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

    please teach hamburger responsive menu using js

  • @CodesHub6784
    @CodesHub6784 11 месяцев назад +1

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

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

    I really..... liked background music can anyone tell me which one is it

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

    Help me develop by subscribing so that I can be more enthusiastic about creating programming content

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

    where you learnt html css js ?

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

    When I'm adding about us section after all this code so why my about us pic and text go up

  • @Iollipop87
    @Iollipop87 7 месяцев назад

    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

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

    how much will this cost if you build the same page

  • @osvaldoandrade_arquitecto
    @osvaldoandrade_arquitecto 7 месяцев назад

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

    • @kja6336
      @kja6336 7 месяцев назад

      a class has precedence over a tagname

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

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

  • @Hs-iq3yr
    @Hs-iq3yr Месяц назад

    cann i add my self the js code?

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

    how close navbar if widow click?

  • @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?

    • @nobaku.3
      @nobaku.3 Год назад +1

      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.

    • @nobaku.3
      @nobaku.3 Год назад

      ​@@marcellszucs2225 yis

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

      @@nobaku.3 this saves me! thank you so much!

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

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

    • @webdevcreative
      @webdevcreative  Год назад +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.

  • @Filmgraphix_studios
    @Filmgraphix_studios 10 месяцев назад +2

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

  • @MovieHeretic
    @MovieHeretic 2 дня назад

    JS not working in Firefox based on screen code shown here.

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

    When I reduce the screen my bars disapear, I dont know why

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

    cdnjs cannot access