Navbar CSS Tutorial: 3 Ways to Create a Navigation Bar with Flexbox

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 985

  • @matthewborkowski5313
    @matthewborkowski5313 2 роки тому +194

    Great tutorial. Loved the pacing. Perfect I think for someone that already understands a bit about CSS and HTML, no BS, just content, looks great too.

    • @Skillthrive
      @Skillthrive  2 роки тому +2

      Glad you enjoyed it!

    • @jgappy
      @jgappy 2 роки тому +5

      Bro...u could have just used Emmet abbreviation ! for boilerplate

    • @d.o.nmuzic3802
      @d.o.nmuzic3802 2 роки тому +1

      Yup! Pace is perfect! End result is amazing. And I love that he explains what the code is doing.

  • @SpeakDrumz1
    @SpeakDrumz1 Рік тому +23

    15 min video and I stayed all day long doing this. Thank you! For sure helped a lot.

  • @olawalevictor134
    @olawalevictor134 Рік тому +11

    Scrolling down my feed and found this video today. One of the videos that helped me back then when I was a beginner. Thank you.

  • @rathernotdisclose8064
    @rathernotdisclose8064 4 роки тому +76

    in visual studio code, you don't have to select a line to copy it, just place your cursor at the end of the line without selecting the content there, and hit CTRL C (or x for cut) and it'll be copied. Or, in your case whatever the key is on mac.

  • @nehat7924
    @nehat7924 4 роки тому +79

    Thanks very much mate, this is exactly what I was looking for !!!

  • @saurabhdaswant7833
    @saurabhdaswant7833 3 роки тому +8

    Thank you for the tutorial man before waching this i was not knowing what does
    1 inline-block
    2 display: flex
    3 justify-content
    etc......
    i was really searching this type of content
    thank you so much

    • @Rajpatel_1103
      @Rajpatel_1103 4 місяці тому

      Inlineblock means left and right both side we can handle in margin padding etc

  • @Skillthrive
    @Skillthrive  5 років тому +8

    Tutorial on how to make this navbar mobile friendly: ua-cam.com/video/WxQZsN6LICM/v-deo.html
    Updates [ Aug 2019 ]
    It's not best practice to wrap a button with an a tag. Instead, just give the a tag a class and style the link to look like the button.
    Also not a good idea to set background color on all elements like I did because you'd more than likely run into some unexpected styling if you were using this for your website.

    • @sougataghar1179
      @sougataghar1179 5 років тому

      instead of setting margin to auto , cant we also set justify-item to flex-start ?? for the logo i meant, soo it goes to left all the way

    • @erickhilario6217
      @erickhilario6217 5 років тому +2

      @@sougataghar1179 but you will have that use the property flex-direction: row-reverse and back to same

    • @gandalfshandle
      @gandalfshandle 5 років тому

      What color theme is installed in your VS code?

  • @supportex2228
    @supportex2228 5 років тому +10

    Very nice mic quality and clear explanation of what did you do in this tut. Looking forward for more!

  • @mshimanshu1000
    @mshimanshu1000 3 роки тому +8

    YOU JUST SAVED A LIFE MAN !!!!!!!!!!

  • @liverpoolkelly7
    @liverpoolkelly7 2 роки тому +2

    That order property is a godsent! I was banging my head for days trying to create a centre logo navbar

    • @Skillthrive
      @Skillthrive  2 роки тому

      It really is. It's almost a magical CSS property.

  • @FRONTRUS
    @FRONTRUS 4 роки тому +12

    This channel should be rearward!
    They post tutorial videos for free and without any advertisements! 😍😍😍😍

  • @FernandoHernandez-jp4gt
    @FernandoHernandez-jp4gt Рік тому +5

    Thanks for this! Seems so complicated at first but after a few replays I got the gist of the design and now kinda know it myself!

  • @dariomasip
    @dariomasip 5 років тому +4

    The moviment of the cursor with that blur is amaizing!

    • @JulianColeman03
      @JulianColeman03 5 років тому

      It's because he's using a high refresh-rate monitor

  • @deadlysilence5511
    @deadlysilence5511 4 роки тому +12

    Great tutorial! Funnily enough, I use Montserrat too and have used it in past projects, I was just searching around for some good navbar tutorials. Keep up the good work!

    • @developer2
      @developer2 3 роки тому

      Same man, Montserrat just genuinely looks good especially with websites!

  • @Skillthrive
    @Skillthrive  5 років тому +4

    ⚠️ October Updates (Code reflected in course files)
    • Mobile navigation added to all examples (in-depth example here: ua-cam.com/video/WxQZsN6LICM/v-deo.html
    • Imported the Google Fonts in the head section of the index.html file instead of the CSS file
    • Removed the button that was being wrapped by the a tag and moved the button styles into .cta class styles
    • Removed the global background color (sorry for the confusion, this was a bad idea in hindsight) and moved it into the header styles

    • @Skillthrive
      @Skillthrive  5 років тому

      @Woohui Kim Just updated. Thanks for letting me know.

  • @zero0bb
    @zero0bb 3 роки тому +2

    this is weird basic stuff that I never knew could be implemented like this, nice.

  • @manarahmed1917
    @manarahmed1917 4 роки тому +4

    Thank you so much I appreciate it when people actually explain what they are doing in css!

  • @bchinggisi
    @bchinggisi 5 місяців тому +1

    bro Your helping millions of people around the globe i really appreciate it and i'm actually Learning From your Videos Your have Earned a loyal Subscriber

  • @vencalysek7847
    @vencalysek7847 5 років тому +10

    Amazing video, in 15 minutes taught me more than cod*cad*my css course!
    THANK YOU so much!

    • @Skillthrive
      @Skillthrive  5 років тому

      That’s awesome to hear, Venca!

    • @vencalysek7847
      @vencalysek7847 5 років тому

      @@Skillthrive If i may, can I have one question?
      How to make fixed navbar while scroling? i used position: fixed, and then all 3 sections came together. Somehow it overwrites justify-content
      Thanks for help :))

    • @Skillthrive
      @Skillthrive  5 років тому +1

      @@vencalysek7847 It's actually pretty easy using position: sticky. Checkout this link with the code: codesandbox.io/embed/static-72sod
      I added comments in the css of what I changed.

    • @vencalysek7847
      @vencalysek7847 5 років тому

      @@Skillthrive Thank you very much! :)

  • @gorsama-2190
    @gorsama-2190 5 років тому +72

    Wow your videos are so good definitely better that those with music, love your content keep it up👍♥️

  • @leandrodossantos9160
    @leandrodossantos9160 4 роки тому +21

    Thanks dude, I was looking for this kind of structure!

  • @alelined
    @alelined Місяць тому

    Great tutorial! so glad I run into this video first cause a practical exam is coming up tomorrow, the codes r very clear and I finally know why my navigations aren't in the right place. Thank you!

  • @dannyjdhall
    @dannyjdhall 3 роки тому +14

    Just found this tutorial. Thank you. I love the modern look, and this helped me solidify my knowledge in creating navbars.

  • @solme8577
    @solme8577 2 роки тому +2

    Just finished with the tutorial. Simple yet effective. Thank you sir!

  • @usama57926
    @usama57926 5 років тому +29

    amazing design and explanation

  • @spacelama666
    @spacelama666 5 років тому +27

    Just what I needed, keep em coming!

  • @rjc4200
    @rjc4200 3 роки тому +21

    Short, Crisp and to the point. Thanks for this video. Keep it up :)
    It also reminds me why we usually tends to use different CSS framework/s just to avoid writing so many lines of code just for a simple nav bar design.

    • @contraspower6302
      @contraspower6302 3 роки тому +1

      In the html why did he put the img inside the header? Why can't we put img under nav.

    • @sidrashawaj
      @sidrashawaj 3 роки тому +5

      @@contraspower6302 because we want the header to be divided into 3 parts, basically (logo, links and button). So if u include the img under nav, you can't have the logo set anywhere far from the nav elements.

    • @contraspower6302
      @contraspower6302 3 роки тому +1

      @@sidrashawaj Thanku brother 🙏

  • @RodieOsc
    @RodieOsc 25 днів тому

    YOO thanks alot !!!! so many videos were doing it really weird and this one was the most understandable !

  • @aalayer2834
    @aalayer2834 4 роки тому +4

    Keeping things nice without any bootstrap related stuff! Noce tutorial mate

  • @ngire
    @ngire 5 місяців тому

    i've searched for 2 weeks! Thanks man.

  • @skully8767
    @skully8767 4 роки тому +185

    does he actually memorize all those hexa.. color codes

    • @hassansiddiqui428
      @hassansiddiqui428 4 роки тому +21

      With time you learn

    • @jer461
      @jer461 4 роки тому +32

      He may use those colors frequently so he memorized it already. There's a million of hex codes and no one in the world has memorized them.

    • @PhilBot4OOO
      @PhilBot4OOO 4 роки тому +16

      Nah pretty sure you can hear his voice shif to a reading tone rather than recalling naturally from memory!

    • @j._rom4597
      @j._rom4597 2 роки тому +1

      Nope

    • @mbonisimtunzi
      @mbonisimtunzi Рік тому +3

      You surely remember you favorite colors

  • @Loki_Dokie
    @Loki_Dokie 2 роки тому

    Thanks bro, i know it seems simple, and I'm pretty proficient with all else html and css, but navbars have just given me hell for some reason. Thanks, you've cleared it up for me.

  • @mhhamzaedits
    @mhhamzaedits Рік тому +3

    Thank you sir ❤
    I am from India 🇮🇳

  • @AppOasis82
    @AppOasis82 6 місяців тому

    truly clear explanation and straight to the point. Looking forward getting this good at coding.

  • @brunopeselli3662
    @brunopeselli3662 5 років тому +9

    On point! just what I needed, keep it up 🤘🏼

  • @alvarezgamers
    @alvarezgamers 2 роки тому +2

    You have an extremely effective way of explaining stuff. You got a new sub! :)

  • @velocikitty9300
    @velocikitty9300 2 роки тому +8

    Great content. I was able to follow along and even correct my mistakes when it didn't turn out like yours. I'm a complete beginner so I can't say it is beginner friendly (for my level at least) since I was just following along and didn't understand what I was putting in. But that's because I'm a level 1 out of 3 beginner. If you're in the mid-range beginner (if that makes sense) I think you'll be able to pick up on this really well since I did with my complete lack of knowledge. But this was great to learn. Once I get the hand of the basics, I think I'll be able to follow along and understand more completely. Thank you for this content.

    • @sugoish9461
      @sugoish9461 Рік тому

      How's it going for you? :D

    • @DrEggCake
      @DrEggCake Рік тому

      if@@sugoish9461if u want i can help u both with code

  • @bhoot1702
    @bhoot1702 3 роки тому

    Amazing video. I was frustrated so much but this video helped me

  • @christiancolewan
    @christiancolewan 3 роки тому +4

    Im making a portfolio and i was having trouble in the navigation bar
    this tutorial is exactly what i needed.

    • @許潤璋
      @許潤璋 3 роки тому +2

      I'm glad I'm not the only one.

  • @akashgillella
    @akashgillella 3 роки тому +1

    Very nice video man, thanks. It was so simple mannn!

  • @jaydenmoon1165
    @jaydenmoon1165 3 роки тому +5

    Wow this was presented very clear and concise - wonderful video - I learned a lot, thank you :D

  • @ericgraham5201
    @ericgraham5201 2 роки тому

    Finally a header without 20 div tags!

  • @Floriskoek
    @Floriskoek 4 роки тому +3

    Damn awesome. To the point, clear and explained what you are doing. Thank you so much!

    • @Skillthrive
      @Skillthrive  4 роки тому +2

      Thank you! Glad you enjoyed it.

  • @haileymae42
    @haileymae42 Рік тому +1

    Thank you so much! This really helped me for my major project

  • @jackroses1064
    @jackroses1064 3 роки тому +3

    Exactly what I needed 😃

  • @TheChosen0791
    @TheChosen0791 3 роки тому

    Great tutorial, now I am starting to understand Flexbox.

  • @mohamedsuhailirfankhazi6628
    @mohamedsuhailirfankhazi6628 2 роки тому +3

    Great tutorial! Simple to follow and to the point. Very helpful.

    • @Skillthrive
      @Skillthrive  2 роки тому +1

      Glad you found it helpful! Be sure to check out my new stuff, too. 😊

  • @maxsaparaliev4027
    @maxsaparaliev4027 4 роки тому

    Holy, man. Thanks, i've just learned that i can order elements in a flex container. Awesome, ty again man.

  • @eugenechernov837
    @eugenechernov837 5 років тому +4

    Great professional tutorial. Thank you!

    • @Skillthrive
      @Skillthrive  5 років тому +1

      You’re welcome Eugene! Be sure to check out the new one I posted today about how to make the navbar mobile friendly.

    • @zReeMaKe
      @zReeMaKe 4 роки тому

      Skillthrive trying to find this video.

  • @garettclement6671
    @garettclement6671 Рік тому +1

    Expert skill, straight to the point. Subscribed! Will be supporting soon

  • @adamoceallaigh2267
    @adamoceallaigh2267 5 років тому +64

    Hey man , great tutorial . Just wondering do you know that the option HTML : 5 under the boilerplate one that you added with the extension in VSC achieves the same result as what you get at 2:14 and you don't have to delete the comments . A quick shortcut with emmet to activate this is - just type ! and press tab at the start of the html page and you get exactly what you need . Just letting you know . Great tutorial though , helped me a load , thanks . Keep it going 👍

    • @adamoceallaigh2267
      @adamoceallaigh2267 5 років тому +11

      Emmet is an unreal shortcut that comes pre-installed with VSC , you can also make an ordered list with three li a tags very quickly by typing ul>li*3>a and pressing tab and there you go ! :)

    • @Skillthrive
      @Skillthrive  5 років тому +18

      Hey, Adam. Thanks for the kind words. I actually found out Emmet come pre-installed after posting this video, but I honestly don't use it much. I need to practice using it more, though.

    • @Wake_up_to_reality_143
      @Wake_up_to_reality_143 Рік тому

      @@Skillthrive good thought

  • @BTFezzer
    @BTFezzer 3 роки тому

    i learnt more from this then i did from an hour long tutorial on css thanks

  • @dimtodim
    @dimtodim 5 років тому +29

    great job mate :)...i know all that stuff but i forget detail :) nice to fresh memories...

    • @Skillthrive
      @Skillthrive  5 років тому +10

      Thanks! It’s crazy how fast we can forget things. 😅 Refreshers are always nice.

  • @kasuniversity
    @kasuniversity Рік тому

    Wonderful. I learnt new ways of doing the Nav bar.

  • @mrCetus
    @mrCetus 3 роки тому +5

    Thank you for this tutorial! I made all three and changed the CSS to have variables at the top to make it more customizable and put the navbar into a div element. I also make the image a link! So if I ever need this for a project I can just insert the code to my page.

  • @torrance007
    @torrance007 2 роки тому +1

    I love this tutorial, it was exactly what I was looking for.

  • @barbaraquintero3068
    @barbaraquintero3068 2 роки тому +3

    Does everyone knows why can't I set the logo to the right side? with margin-right:auto; I don't understand
    EDIT: If this happened to you, in my case, I've put the logo into a tag, you have to put the margin-rigtht to that class and not for the logo.

  • @Narceologist
    @Narceologist 2 роки тому

    Thank you so much for this, just started learning and I was so stuck trying to make a navbar.

  • @adamvalli6233
    @adamvalli6233 2 роки тому +6

    I feel like joe rogan is teaching me flexbox

    • @Skillthrive
      @Skillthrive  2 роки тому

      I am Joe Rogan.

    • @HaveANiceDayLol.
      @HaveANiceDayLol. 16 днів тому

      @@Skillthrive Can you ask Jamie to pull up that video of a bear learning flexbox

  • @sananshaikh7511
    @sananshaikh7511 3 роки тому

    finally a worthy video. thank you so much for making it!

  • @naitikkathiriya
    @naitikkathiriya 3 роки тому +24

    It's so simple stylings and HTML formatting for header class building.. thank u so much the maker! Really helped. And video ending Subscribe button neon effect u make so cool✔️✨

  • @andrillaf
    @andrillaf 4 роки тому

    Thank you so much! I’ve been trying to figure this out for awhile. No one else made it click for me.

  • @anuj7286
    @anuj7286 5 років тому +3

    Thanks for making this tutorial 🙂

    • @Skillthrive
      @Skillthrive  5 років тому +2

      You're welcome! LMK if you have any questions. 😁

    • @anuj7286
      @anuj7286 5 років тому +1

      @@Skillthrive can u make this responsive?

    • @Skillthrive
      @Skillthrive  5 років тому +1

      It’s possible, I just didn’t do it in this course bc I thought it would make the video too long.

    • @Skillthrive
      @Skillthrive  5 років тому +1

      Keep an eye out for a video on how to create a responsive menu though. I might do it this week.

    • @Skillthrive
      @Skillthrive  5 років тому +3

      Hey, I just published a video on how to make this design mobile friendly: ua-cam.com/video/WxQZsN6LICM/v-deo.html

  • @colinabel4051
    @colinabel4051 4 роки тому

    cheers been using this as a reference for a much more complicated header and its dumb helpful

  • @TheSpiralnotizblock
    @TheSpiralnotizblock 4 роки тому +3

    bro you actually saved my ass

  • @Joel.Invictus
    @Joel.Invictus 4 роки тому +1

    Very Helpful demo, bro. Thanks a lot!

  • @forhadrh
    @forhadrh 4 роки тому +3

    Wow! Such an awesome nav with such simple code.. Why I don't think that way -_-

  • @levros-i7s
    @levros-i7s 2 роки тому +1

    Beautifully designed and edited video, thanks for the tutorial.

  • @polartitangaming1887
    @polartitangaming1887 4 роки тому +72

    I kind of wish we got to see more of how this looks on multiple browsers. Such as mobile, tablet, etc. I can make great NAV bars, but designing something that works on other things is hard to do for me.

    • @sarfarazstark
      @sarfarazstark 2 роки тому +2

      why not check in inspect

    • @edris9664
      @edris9664 Рік тому

      use media queries (@media) set max-width: (however many pixels); for optimizing for desktop sizes. if you're optimizing it for mobile use min-height. @mustangbs9897

    • @billzade8158
      @billzade8158 Рік тому

      You can also adjust paddings, margins, positions, etc...based proportionally instead of by pixel as well

    • @atlantic_love
      @atlantic_love Рік тому +1

      who cares about those platforms?

    • @billzade8158
      @billzade8158 Рік тому +1

      @@atlantic_love some do.

  • @byzeezus
    @byzeezus 3 роки тому

    THANK YOU IVE BEEN LOOKING SOOO MUCH ON HOW TO DO THISSS

  • @trungphan3504
    @trungphan3504 5 років тому +3

    it's really nice, thank you

  • @vfxjmb
    @vfxjmb Рік тому

    nice tutorial bro
    ive been struggling for a while trying to learn css flexbox

  • @MartinoxxHD
    @MartinoxxHD 5 років тому +4

    So the "li:nth-child(1)" value it's used to give a style only to the first , right?

    • @Skillthrive
      @Skillthrive  5 років тому +1

      Yep! 🙂

    • @sciencecompliance235
      @sciencecompliance235 5 років тому +1

      You could also use "first-child". I forget the specific syntax. I think it's first-child, but you'll want to verify that.

  • @СерёгаСТАЛКЕР-х7в
    @СерёгаСТАЛКЕР-х7в 3 роки тому

    Thank you, you did not miss anything and took into account.

  • @nandhinianand2786
    @nandhinianand2786 5 років тому +3

    Thank you so much!!!

  • @ifailed6935
    @ifailed6935 2 роки тому

    you're so good you make it look so easy

  • @pederrudi6352
    @pederrudi6352 4 роки тому +10

    my logo kind of appears ontop of the navbar? how do I make it be next to it?
    edit:
    my logo img was inside . it was fixed when I placed it before

  • @umangternate
    @umangternate 3 роки тому

    I learned many new things in this video, especially, order...

  • @AllyG1967
    @AllyG1967 5 років тому +4

    Great video, thanks. Newbie question - Right at the beginning, why did you name your folders with an underscore.

    • @Skillthrive
      @Skillthrive  5 років тому +8

      So your folders will automatically be alphabetized, but if you put a _ in front of the word it will alphabetize those first. So I like to put my main folders with a _ and less important ones without. You can even add another _ to the existing one and it will start over with those alphabetized first. Kinda like this:
      __a
      __b
      __c
      _a
      _b
      _c
      a
      b
      c

  • @teched7467
    @teched7467 4 роки тому +2

    Thanks really helpful I understood all the code and now I know how to create menus and buttons

  • @gurulovearthi
    @gurulovearthi 3 роки тому +4

    How to make responsive bro please tell me

  • @chalepeaddict
    @chalepeaddict 2 роки тому

    Incredibly helpful tutorial - good job !

  • @TheTonyMan
    @TheTonyMan 3 роки тому +3

    Good tutorial, thanks! But there is a slight correction. Button and link are different entities, it makes no sense to place a button inside a link.

  • @tomc0240
    @tomc0240 3 роки тому

    This is excellent. Clear and concise

  • @Fleshlight_Reviewer
    @Fleshlight_Reviewer 5 років тому +4

    note to self: use this

  • @orincywhytedesigns
    @orincywhytedesigns 3 роки тому

    Ahhhhhhh the last example was so helpful!!!! Thank you

  • @jackfrost8969
    @jackfrost8969 3 роки тому

    This is golden content.

  • @virajchandugade4361
    @virajchandugade4361 Рік тому

    Thanks a lot dude, looking further for more quality content

  • @jamshaidmalik463
    @jamshaidmalik463 3 роки тому

    This video is really helpful for me thanku sooooo much channel owner❤️

  • @facundocruz8133
    @facundocruz8133 2 роки тому +1

    Nice video bro,
    greetings from Argentina 💙🤍💙

  • @michiakbar2345
    @michiakbar2345 2 роки тому +1

    you really a great teacher!Thank you!

  • @Website_TV_1
    @Website_TV_1 3 місяці тому

    I love this tutorial, wonderful lesson❤

  • @muhammadzafar2470
    @muhammadzafar2470 4 роки тому +1

    very smooth and smart way of coding . i like it too much and very helpful for me .

  • @jesterlw
    @jesterlw Рік тому +1

    Thanks man, very clean and simple!

  • @twicegamerlive
    @twicegamerlive 3 роки тому +2

    So simple, unbelievable, how could I even struggle with this. Thanks for your help!

    • @contraspower6302
      @contraspower6302 3 роки тому

      In the html why did he put the img inside the header? Why can't we put img under nav

    • @twicegamerlive
      @twicegamerlive 3 роки тому +1

      @@contraspower6302 If he would've, the Logo would be directly next to the Listend Items (Services, Projects, About).

    • @contraspower6302
      @contraspower6302 3 роки тому

      @@twicegamerlive Thanks for replying brother. But i have one doubt why it is like that?

  • @betgani
    @betgani 4 роки тому

    Amazing video, and the explanation was FENOMENAL.

  • @hagahaguusha2691
    @hagahaguusha2691 3 місяці тому

    Thank you for reaching me this tutorials I've been searching such this course
    Thanks again 😊😊

  • @knowledge5608
    @knowledge5608 3 роки тому +1

    Thanks for such an amazing Video, I just Loved and wanted to me the second kind of navbar.

  • @ronnelmacompas1647
    @ronnelmacompas1647 2 роки тому

    This is great navbar. Thank you!

  • @ankitpal7793
    @ankitpal7793 4 роки тому +1

    thanks for boosting my confidence