Bootstrap 5 Navbar Tutorial

Поделиться
HTML-код
  • Опубликовано: 6 июн 2024
  • Here's how to setup your navigation with Bootstrap 5 using the navbar class. I'll walk you through how to set it up along with ensuring the navigation is ADA accessible per the W3C.
    ** Be sure to stick around until the end to see how ADA accessibility works and how to check your site with Chrome's inspect. **
    Purchase & Download the source code:
    adwc.dev/products/94
    More Bootstap 5 Goodness:
    • Bootstrap 5 Tutorials
    In this video I'll cover how to:
    - Build a basic nav bar
    - Move the navigation to the right
    - & Add a logo
    Thanks!
    Haydn
    // COURSES THAT WILL HELP YOU BUILD BETTER WEBSITES
    ○ Bootstrap Bootcamp (for Bootstrap 5): adesignerwhocodes.gumroad.com...
    ○ Gatsby Demystified: bit.ly/3xf2yyQ
    // Premium Gatsby Starter Template
    ○ Ultimate Gatsby Starter: adesignerwhocodes.gumroad.com...
    // Helpful RUclips Playlists:
    bit.ly/3rrHj9D Bootstrap for Web Designers & Developers
    bit.ly/36HEYPZ React Bootstrap & Gatsby
    bit.ly/3twVn3C Gatsby for Web Designers
    🛠 THE TOOLS & SERVICES I USE:
    ○ Where I buy my domain names (GoDaddy) - bit.ly/3v2GV2N
    ○ Email provider, lead generation and more! (ConvertKit) - bit.ly/3xbqwup
    ○ Graphic Design Tools, stock images and more (Canva Pro) - bit.ly/canva-pro-adwc
    ○ Website Hosting (Netlify) - www.netlify.com
    ► Join ADWC Nation on Discord
    / discord
    DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel so I can continue to provide you with free content each week!
    Hi there! Haydn Adams, BFA. I'm all about helping web developers and web designers build better websites, through code. Yes, coding and be difficult at first. But I'm here to demystify that. To make coding easy so that you can ultimately build a better website.
    Got a question for me?
    adesignerwhocodes.com/contact/

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

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

    Thank you so much! from all the channels I finally found the one who explains every tag atleast, not coding with just music! from now on I'll be following you! big support from Italy!

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

    I am a beginner for BS5 and your tutorial is such a lifesaver!! Clean and structured. Thank you sooo much~~

  • @nnwebdigital
    @nnwebdigital 3 года назад +11

    Finally, I have found the way to move navigation to the right. Thank you very much! 👏

    • @ADesignerWhoCodes
      @ADesignerWhoCodes  3 года назад +2

      Oh sweet! Glad to have helped.

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

      Yes I wasted 4hrs to move it to right

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

      @@soumajitghosh02 so did I, I was trying to wrap a row and column to get it to move right. but ms-auto and ul>li>a tags were all i needed.

  • @narenanand6270
    @narenanand6270 3 года назад +2

    Stuck in this part for quite a lot of time. Thank you

  • @daraqadir
    @daraqadir 3 года назад +4

    Very helpful, the voice and the way you are talking very clear, Thank you master!

  • @ThilinaWimalapriya
    @ThilinaWimalapriya 3 года назад +4

    This is completely understandable to anyone. Thanks for sharing your knowledge with us.

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

    This tutorial is really well done. Thanks!

  • @christellemata8037
    @christellemata8037 3 года назад +2

    Omg! I don't know how to thank you i've been stuck for days ! keep it up the good Work!

    • @ADesignerWhoCodes
      @ADesignerWhoCodes  3 года назад

      What? That's so awesome Christelle. I'm stoked I could help you.

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

    Your tutorial on Navbar is very intuitive that I now understand it much better. Thank you for making this great video.

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

    Amazing explanation and vid man. U made it all so simple and crystal clear. Keep Going!

  • @meez6314
    @meez6314 3 года назад +1

    This is such a good tutorial, thank you!

  • @otasofovwe1939
    @otasofovwe1939 3 года назад +1

    Phew . Finally I can move nav items to the right with logo on the left . Thanks a lot for this .

  • @keithmax5535
    @keithmax5535 3 года назад

    Your explanation is awesome, finally I understand how to design navbar

    • @ADesignerWhoCodes
      @ADesignerWhoCodes  3 года назад

      Oh sweet! Once you finish your site design, drop me a comment with the URL. would love to see it!

  • @user-yt4ln6ou7r
    @user-yt4ln6ou7r Год назад

    Highly recommended !!! for beginner such a huge explanation I got lots of help with your videos.

  • @ridaharun3621
    @ridaharun3621 3 года назад +2

    I spent one Hours sreaching to move navgationbar to right until i find you ,, Really helpful

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

    Thank you for actually having a detailed explanation of everything you're doing with examples at a speed that allows me to retain most of the information!

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

    Thanks so much for this tutorial I'm a beginner and I really needed a step by step Navbar Tutorial yours is the best I've seen so far

  • @jackcollazo
    @jackcollazo 2 года назад +3

    Excellent tutorial. I was missing the class "ms-auto" and this video explained it well. Thank you!

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

    This is so clearly to understand it. Thank you for this tutorial.

  • @johnvincentvillanueva8810
    @johnvincentvillanueva8810 3 года назад +1

    thank you for making this tutorial, its very helpful

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

    This is the best video on this topic. Thank you

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

    You saved me so much time! Thank You!!

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

    Excellent tutorial. Thank you for making this great video.

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

    Soooo clear!! Thank you.

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

    Another excellent video...much appreciated!

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

    This was an amazing tutorial!

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

    Awesome explaining >> Thank you

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

    Thank you bro, I didn't know how to get the drop down text off the left side. Seems kinda obvious now!

  • @rose-marlinesidney4896
    @rose-marlinesidney4896 2 года назад

    thank you. That helped me !

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

    Thank you for this!

  • @tvoy_podpischik
    @tvoy_podpischik 3 года назад

    this. is. amazing. thanks a lot!

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

    Perfect, thank you!

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

      You're welcome Tim!

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

      @@ADesignerWhoCodes your website link which you have given in the comment for downloading the source code is not functional it says "Success! Now check your email to confirm your subscription. After that, you'll get the source code." but it never sends me any email

  • @muhamadsidiq8668
    @muhamadsidiq8668 3 года назад

    thnk u.. this is amazing !!

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

    Amazing, thank you! you are an angel

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

      Wow. Thank you!

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

      @@ADesignerWhoCodes 8:02 when i shorten the size of the window the menu button shows but that button is not functional on my side please help

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

    Thank you!

  • @bio-radingenieriabiomedica7898
    @bio-radingenieriabiomedica7898 3 года назад +1

    Let me tell you you are great!!! I am making a Full Stack Developer Course and the NavBar didn´t work because of the different versions of Bootstrap. I couldn't make it work until I came to this video. I am not an English speaker... but your video was really excellent explained. Thank you so much!!!

    • @ADesignerWhoCodes
      @ADesignerWhoCodes  3 года назад

      Muchas gracias! Thank you so very much. I’m beyond grateful to help you along the way of your developer course. Good luck on building the course! It can be a journey.

  • @ilan19891
    @ilan19891 3 года назад +1

    Thank you so much for the explanation, it's really helpful.
    I am trying to put the navbar in the center with mx-auto but without success. Where exactly it should be? My nav bar is stuck to the right for some reason.

    • @ADesignerWhoCodes
      @ADesignerWhoCodes  3 года назад

      Hmmm. Try this:
      getbootstrap.com/docs/5.0/components/navs-tabs/#horizontal-alignment
      I guess .mx-auto doesn't work but .justify-content-center does.

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

    Thank you bro,

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

    Thank you so much

  • @siris896
    @siris896 3 года назад

    Thank You

  • @papayaspice1155
    @papayaspice1155 3 года назад

    nice video!

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

    can you explain those data-bs-toggle etc. bec i dont know them are there static ?

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

    thank you so much

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

    This is a really good tutorial thanks! Is there a way to change the colour of the hamburger button without using the navbar-light/dark class in the nav? Im not using that tag because i want the navigation links to be different colours but as a result it makes the hamburger menu not show up

  • @buckyhelmsmash7670
    @buckyhelmsmash7670 3 года назад

    thank you vry much!!!

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

    I thank thee sir 😃❤️

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

    Thank you

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

    This is great, Bootstrap Navs are pretty easy, but to put the logo on the left and nav on far right stumped me,,, then suddenly!!! ms-auto ha ha hah aha, great stuff, thank you !!!

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

    Guy thanks a lot Allah bless you. make some full bootstrap 5 tutorial.

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

    Finally I can move nav items to the right, idk using row/col not work

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

    Thanks, that's amazing. but how I can put my li links in the middel (center)? I want the pricing / features should be in the center. thanks in advance

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

    thanks

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

    Heyyyy!!!!! Thank you very much for this tutorial... It helped a lott!!! And can you please show us the dropdown menu on hover using bootstap 5.. I really need it. 🥺🥺

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

      Hate to break it to you, but there's no drop-down hover any longer. That's because everything in mobile-based and there's no hover on a mobile phone.

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

      @@ADesignerWhoCodes ooohhhh.... okk .. Thanks man 🤗🤗🤗🥰🥰

  • @claudiofuentes9625
    @claudiofuentes9625 3 года назад

    I'm not english native, but I could understand all. Thank you!!

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

    Hello, how do I use this navbar to another HTML without copying the whole code?

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

    how do i make the buttons actually work though?

  • @Rsilvacortes
    @Rsilvacortes 3 года назад +1

    This is better content than the payed curses on Udemy lol Thanks 4 the content tho!

  • @macarenaalonso5853
    @macarenaalonso5853 3 года назад +4

    Hi! idk if i am the only one who's having this problem, but i copied the exact code and everything goes well, until it breaks to the mobile menu. It shows the icon of the navbar but when i click it, it doesn't show the links, like, Pricing, Features and Contact. it's just nothing there. Anyone knows why this could happen?

    • @ADesignerWhoCodes
      @ADesignerWhoCodes  3 года назад +1

      Hmmm. I'm not sure. But I also realized that I forgot to upload the source code so you can check your code against mine. Check the description where you can download an example and you can cross-check your code. I hope that helps you Macarena.

    • @jonasamdroid2356
      @jonasamdroid2356 3 года назад

      @@ADesignerWhoCodes Hey man, tahnk you for providing the source Code. You dont realise how amazing that is. I really wann to Express my graditude for providing the best Video about bootstrap 5 . Youre amazing. Thank you

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

      same

  • @checktheback.
    @checktheback. 2 года назад

    Thank you for your Video. I'm working on my project for my study and I would like to know how to change the navbar for different pages.
    While being on the profile site. Is it possible to use a placeholder in the navbar to show on the right side "Profile".
    I'm trying to show the current page Name on the top left side of the navbar but until know I wasn't successful.
    Something like this:
    and a JS which proofs the current class of each page
    Something like this:
    if(main.hasClass("aboutUs)) { page_title.innerHTML = "About us" }

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

      If you're building HTML pages, just make a new page with the title "About Us" and add an active class to the "about" navigation. (Shameless self plug here) but I've got a complete course on Bootcamp if you want to take it further. adesignerwhocodes.gumroad.com/l/DjOao

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

    I'm a beginner to BS5 and it's slightly overwhelming. How long until one is able to memorize all the different classes and property values inherent to BS? Do you have any tips on how to practice memorizing all of that?

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

      How do you get to Carnegie Hall? Practice.
      It literally just takes practice and Google. I often times type into Google, "Bootstrap flex". I don't remember all of the classes, but I know where to find them. 😎

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

    Not really sure what is happening but the menu won't work. It shows up on the screen but the toggle isn't working. Project os built in Angular with Bootstrap 5

  • @pilarelisii8265
    @pilarelisii8265 3 года назад +3

    hi, I got a problem with close the menu, idk why it doesn’t work, when I click on the button nothing happens, the menu still open. nice video, thanks!!

    • @ADesignerWhoCodes
      @ADesignerWhoCodes  3 года назад

      It could be that there is no JavaScript attached. Check the source code and see if you are missing something.

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

    is there any way to customize the colors of the nav links?

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

      Yes. Just inspect the css and then in a custom css, change the color. That could make for a good future video :)

  • @fatemen3764
    @fatemen3764 3 года назад

    tnx

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

    ive managed to creat the toggle button, inserted all the items in it. but when i click it does not respond. could you please advice what could i be missing, thanks

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

    is it possible to make cards hoverable so that they are clickable?

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

      Yes, but there's no hover on am mobile site. Just use a:hover.

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

    6:50 How exactly did the nav bar immediately turned into a row after adding "navbar-nav" to the ul class? It's not working for me.

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

      Download my source code. It's a great way to compare your code with mine and see if anything else is missing or not. Hopefully that will help.

  • @Magma-uw7yo
    @Magma-uw7yo 2 года назад

    Hello, the mobile menu navbar doesn't have the scroll effect. I copy the same code with the bundle link but it doesn't work. Why ?

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

      I've got some source code you're welcome to compare notes to.

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

    but isnt bootstrap supposed to give you the entire code for the navbar of your choosing? i thought this video was about getting a navbar code provided by boostrap and integrating it in the html code, but you are actually building it from scratch, right? or am i missing something?

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

      I’m building it from scratch so you can learn how to customize any component you want.

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

    hey, I am having an issue. My navbar expands but when i click hambutton again it won't collapse.

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

      Not quite sure what’s happening. I put up the source code so you can compare the code to mine.

  • @dusteddream3070
    @dusteddream3070 3 года назад

    Is there a way to put the navbar in the center of the page?

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

    your website link which you have given in the comment for downloading the source code is not functional it says "Success! Now check your email to confirm your subscription. After that, you'll get the source code." but it never sends me any email

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

      If you're still stuck, email me. My info is on my contact page.

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

    What is the ADA abbreviation in programming?

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

      Americans with Disabilities Act. It's an American law that dictates how sites should be built to aid the hearing, vision and other impairments. Here is some more information on it: www.w3.org/standards/webdesign/accessibility

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

    The ham button is not working for me, does anyone know how to solve this problem. I implemented the same code in the video

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

      Hmmm. Did you load the JavaScript at the bottom of the template?

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

    Could you please do the css part too?

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

      The default design comes with Bootstrap. What specifically are you looking for?

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

      @@ADesignerWhoCodes Yes i know, If a person wants to change navigavtion bar color or it's element's color and other various things by choice, and for that only css can help Then how to do it in bootstrap? I know css but it's confusing in bootstrap,having problems. Hoping for you to give a solution. I am having a problem in navigation bar, navbar-dark is preventing colors in elements and when i am removing the navbar-dark, toggle icon disappers.

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

      @@maryamjamal7700 I gotcha. I can make a future video on this. Thanks!

  • @Zeath22
    @Zeath22 3 года назад

    I Fucking love you! thank you

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

    the drop-down button dose not work I copied the code word to word still it dose not sorry to bug you even though u made such a nice tutorial but can i plz get a little more help

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

      Replace every "toggleMobileMenu" with "navbarNavAltMarkup". This can be easily done with CTRL+F

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

      @@mrsansiverius2083 thanks

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

    How to remove the outline of navbar-toggler button?

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

      Hey if anybody having the same problem ,you just have to make the box shadow none on toggler focus.

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

      Correct. You can use the pseudo class ::focus to remove it.

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

    I am using Bootstrap 5 and navbar collapse is not working properly :( The list is not visible when clicking the hamburger menu.

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

      I've got source code available to you. Download the code and see if you are missing something.

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

      @@ADesignerWhoCodes Thank you so much! I'll check that out :)

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

      @@lorraineguillennorbe520 I wish I could help troubleshoot everyone. That’s why I’m happy to provide the source code.

  • @MrMattpnk
    @MrMattpnk 3 года назад

    How can I do a two rows navbar?

    • @ADesignerWhoCodes
      @ADesignerWhoCodes  3 года назад +1

      I’d recommend getting into flex for that.

    • @MrMattpnk
      @MrMattpnk 3 года назад

      @@ADesignerWhoCodes Oh with a flex div and wrapping the elements? Thanks!

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

    the output doesnt look the same for me I dunno what Is the problem i just copied your code

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

      hmm. Not sure. But I have the source code available to download for reference.

  • @PlanetVictic
    @PlanetVictic 3 года назад

    LMAO my name is almost close to yours!!!!!! XD

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

    When clicking the hamburger icon, nothing happens. Unsure what the error might be, I've copied it exactly..

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

      I was using boostrap 4, that's the reason - if anyone has the same problem.

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

      Ahh. Sometimes it's the simplest of things that trip us up.

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

    image became blurry after a minute. had to move on to a different video.

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

    couldn't get the hamburger button to work either like I saw in a few comments, no idea why, I even looked at the source code and compared line to line, spent all day trying to solve this, in the end I just copied and pasted the source code, made my amendments and it worked and I'm left scratching my head 😂 must've missed something despite checking it over 10 times

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

      Make sure you have the JS. A lot of times people forget that one part at the bottom. Good luck! Wish I could individually edit everyone's code.

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

      @@ADesignerWhoCodes I initially did forget that but it still wasn't working after, but it's working now so I'm happy, great tutorial 😊

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

    *_volay ... ocay ..._*

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

    sir with due respect i thought you would explain the individual terms and not just write those classes without explaining what those terms really meant..
    what does navbar toggler, data bs toggle collapse means??????????????????? HOW THESE CLASSES INTERACT WITH EACH OTHER TO GIVE THE HAMBURGER MENU ITS EFFECT ?
    and what are the functions of these classes :
    - WHAT NAVBAR COLLPASE IS DOING AND WHAT COLLAPSE ROLE IS?
    SIR CAN YOU KINDLY EXPLAIN IN ANOTHER VIDEO THE ROLES OR FUNCTIONS OF THESE CLASSES SO THAT THEY DONT APPEAR AS FOREIGN LANGUAGES TO ME???
    THANKS