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

Поделиться
HTML-код
  • Опубликовано: 27 апр 2019
  • This free design and web development course will use Flexbox and basic HTML to create 3 different navbar designs. You'll see some examples of how Flexbox properties like 'align-items', 'justify-content', and 'order' can be used to quickly spin up new web designs.
    This series is intended as a project-based course and will not go in-depth into HTML, CSS, or Javascript. If you want to learn more about those check out the links at the bottom of the description.
    📂 COURSE FILES 📂
    🔗 gum.co/QsaXx
    ⏰ TIMESTAMPS ⏰
    Navbar 1: 0:22
    Navbar 2: 10:18
    Navbar 3: 11:58
    ✅ USEFUL LINKS ✅
    🔗 A Complete Guide to Flexbox: css-tricks.com/snippets/css/a...
    🔗 Google Fonts: fonts.google.com/
    🌟 TOP RECOMMENDED COURSES 🌟
    CSS
    (Paid) Build Responsive Real World Websites with HTML5 and CSS3
    www.udemy.com/design-and-deve...
    (Free) CSS Crash Course For Absolute Beginners
    • CSS Crash Course For A...
    CSS GRID
    (Free) Flexbox CSS In 20 Minutes
    • Flexbox CSS In 20 Minutes
    (Free) A Complete Guide to CSS Flexbox
    css-tricks.com/snippets/css/a...
    CSS FLEXBOX
    (Free) CSS Grid Tutorial
    • CSS Grid Tutorial #1 -...
    (Free) A Complete Guide to CSS Grid
    css-tricks.com/snippets/css/c...
    JAVASCRIPT
    (Paid) The Complete JavaScript Course 2019: Build Real Projects!
    www.udemy.com/the-complete-ja...
    (Free) Learn JavaScript - Full Course for Beginners
    • Learn JavaScript - Ful...
    🔔 SUBSCRIBE 🔔
    / @skillthrive
    👋 FOLLOW US 👋
    INSTAGRAM: / skillthrive
    FACEBOOK: / skillthrive

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

  • @nehat7924
    @nehat7924 4 года назад +74

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

  • @matthewborkowski5313
    @matthewborkowski5313 2 года назад +174

    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 года назад +1

      Glad you enjoyed it!

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

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

    • @d.o.nmuzic3802
      @d.o.nmuzic3802 Год назад +1

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

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

    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.

  • @supportex2228
    @supportex2228 5 лет назад +8

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

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

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

  • @leandrodossantos9160
    @leandrodossantos9160 3 года назад +19

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

  • @deadlysilence5511
    @deadlysilence5511 3 года назад +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 2 года назад

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

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

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

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

  • @gorsama-2190
    @gorsama-2190 4 года назад +71

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

  • @FRONTRUS
    @FRONTRUS 3 года назад +10

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

  • @spacelama666
    @spacelama666 5 лет назад +26

    Just what I needed, keep em coming!

  • @mrCetus
    @mrCetus 2 года назад +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.

  • @brunopeselli3662
    @brunopeselli3662 4 года назад +9

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

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

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

  • @FernandoHernandez-jp4gt
    @FernandoHernandez-jp4gt Год назад +4

    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!

  • @rjc4200
    @rjc4200 2 года назад +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 2 года назад +1

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

    • @sidrashawaj
      @sidrashawaj 2 года назад +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 2 года назад +1

      @@sidrashawaj Thanku brother 🙏

  • @saurabhdaswant7833
    @saurabhdaswant7833 3 года назад +7

    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

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

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

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

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

  • @Skillthrive
    @Skillthrive  4 года назад +4

    ⚠️ October Updates (Code reflected in course files)
    • Mobile navigation added to all examples (in-depth example here: ruclips.net/video/WxQZsN6LICM/видео.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  4 года назад

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

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

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

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

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

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

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

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

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

  • @usama57926
    @usama57926 4 года назад +29

    amazing design and explanation

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

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

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

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

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

  • @jaydenmoon1165
    @jaydenmoon1165 3 года назад +5

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

  • @velocikitty9300
    @velocikitty9300 Год назад +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 8 месяцев назад

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

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

    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.

  • @rathernotdisclose8064
    @rathernotdisclose8064 3 года назад +58

    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.

  • @mshimanshu1000
    @mshimanshu1000 3 года назад +6

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

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

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

    Great tutorial, now I am starting to understand Flexbox.

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

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

  • @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✔️✨

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

    Exactly what I needed 😃

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

    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.

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

    Amazing video, and the explanation was FENOMENAL.

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

    The moviment of the cursor with that blur is amaizing!

    • @JulianColeman03
      @JulianColeman03 4 года назад

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

  • @Skillthrive
    @Skillthrive  5 лет назад +7

    Tutorial on how to make this navbar mobile friendly: ruclips.net/video/WxQZsN6LICM/видео.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 4 года назад

      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 4 года назад +2

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

    • @gandalfshandle
      @gandalfshandle 4 года назад

      What color theme is installed in your VS code?

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

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

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

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

  • @vencalysek7847
    @vencalysek7847 4 года назад +9

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

    • @Skillthrive
      @Skillthrive  4 года назад

      That’s awesome to hear, Venca!

    • @vencalysek7847
      @vencalysek7847 4 года назад

      @@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  4 года назад +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 4 года назад

      @@Skillthrive Thank you very much! :)

  • @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 3 года назад

      Skillthrive trying to find this video.

  • @teched7467
    @teched7467 4 года назад +2

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

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

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

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

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

  • @christiancolewan6523
    @christiancolewan6523 2 года назад +4

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

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

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

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

    Beautifully designed and edited video, thanks for the tutorial.

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

    Thank you so much!!!

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

    it's really nice, thank you

  • @dragos_r4du
    @dragos_r4du 4 года назад +2

    Such a great job. Keep the good work!

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

    Incredibly helpful tutorial - good job !

  • @skully8767
    @skully8767 3 года назад +130

    does he actually memorize all those hexa.. color codes

    • @hassansiddiqui428
      @hassansiddiqui428 3 года назад +14

      With time you learn

    • @jer461
      @jer461 3 года назад +21

      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 3 года назад +13

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

    • @John-wy7xf
      @John-wy7xf Год назад +2

      Its not that hard

    • @j._rom4597
      @j._rom4597 Год назад

      Nope

  • @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: ruclips.net/video/WxQZsN6LICM/видео.html

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

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

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

    Thank you so much! Simple steps and clear explanation!

  • @polartitangaming1887
    @polartitangaming1887 3 года назад +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

      why not check in inspect

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

      it's not looking good on phone, this is not a responsive design.

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

      @@mustangbs9897 use the @media

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

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

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

  • @MartinoxxHD
    @MartinoxxHD 4 года назад +4

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

    • @Skillthrive
      @Skillthrive  4 года назад +1

      Yep! 🙂

    • @sciencecompliance235
      @sciencecompliance235 4 года назад +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.

  • @Joel.Invictus
    @Joel.Invictus 3 года назад +1

    Very Helpful demo, bro. Thanks a lot!

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

    This is excellent. Clear and concise

  • @adamoceallaigh2267
    @adamoceallaigh2267 4 года назад +63

    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 4 года назад +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  4 года назад +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.

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

      @@Skillthrive good thought

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

    bro you actually saved my ass

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

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

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

    Did not know about the order property, thanks

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

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

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

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

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

  • @user-bm9tq5qf3n
    @user-bm9tq5qf3n 2 года назад

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

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

    I feel like joe rogan is teaching me flexbox

  • @AllyG1967
    @AllyG1967 4 года назад +4

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

    • @Skillthrive
      @Skillthrive  4 года назад +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

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

    Excellent content! So easy to follow!

  • @ankitpal7793
    @ankitpal7793 4 года назад +1

    thanks for boosting my confidence

  • @TheTonyMan
    @TheTonyMan 2 года назад +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.

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

    How to make responsive bro please tell me

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

    Thank you so much I thought it was going to be hard and seem pretty easy good detail video makes it so easy to understand ❤

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

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

  • @onion_____
    @onion_____ 4 года назад +4

    note to self: use this

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

    Thanks for your tutorial ! Simple to understand, well explained !

  • @muhammadzafar2470
    @muhammadzafar2470 4 года назад +1

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

  • @muhammadtalha9834
    @muhammadtalha9834 4 года назад +1

    Simply Awesome!!

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

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

  • @ogabogabrian7884
    @ogabogabrian7884 4 года назад +2

    very helpful
    thanks you looking forward for more contents

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

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

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

    Great info and super easy to apply! thank you!

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

    such an amazing video, you helped me a lot! thanks

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

    Thank you, this video has been really instructive.

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

    Just awesome bro!!!

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

    you explain and break things down extremely well. thank you!

  • @punnybunny7043
    @punnybunny7043 4 года назад +1

    So useful, Thank you! :)

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

    Amazing video tut's Bro! It helped me a lot with my project. Again Thankyou.

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

    Just what i need , need to do this. Thanks for tutorial.

  • @twicegamerlive
    @twicegamerlive 2 года назад +2

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

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

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

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

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

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

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

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

    This is golden content.

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

    This was super helpful thank you so much! Will def be looking for more tutorials from you.

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

    Thanks a lot dude, looking further for more quality content

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

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