CSS Flexbox Tutorial #7 - Creating a Menu with Flexbox

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

КОМЕНТАРІ • 128

  • @samdavepollard
    @samdavepollard 7 років тому +114

    Pretty much a case study in how to make a tutorial.
    No filler, no fluff, no BS, just 100% solid meaty goodness.
    Thank You for sharing your knowledge. Super useful.

  • @hippigypsi
    @hippigypsi 7 років тому +3

    I have been studying web dev on youtube for some time now, and have watched many of the guys doing what you do.. you are most definitely one of the best. I appreciate what you do!

  • @kamille8327
    @kamille8327 8 років тому +16

    Wow! I am so stoked about flex boxes! This is great, I can't believe how nice you are to do all these great tutorials for everyone. I have been binge watching your channel like Netflix :-D Thank you!

    • @NetNinja
      @NetNinja  8 років тому +1

      Awesome, thanks :). Really glad you like them!

  • @medoxxxxx
    @medoxxxxx 8 років тому +38

    Ninja you are the coolest explainer in youtube. I have a loooooot of channels to learn css and other programming stuff, but your videos are the most helpful. Thanks!

    • @NetNinja
      @NetNinja  8 років тому +3

      Thanks so much :).

    • @dondeleva7302
      @dondeleva7302 7 років тому

      He is the best ! Thank you again !!!

  • @linhngo8092
    @linhngo8092 8 років тому +2

    This is awesome. I'm a newbie to web dev and although I have heard about Flexbox, I haven't looked through it till now. This flex feature is amazing, so powerful and convenient. Thanks for your amazing vids ;) Keep it up

  • @GabrielMartinez-ez9ue
    @GabrielMartinez-ez9ue 6 років тому +1

    Net Ninja.. thank you for existing. Things Udemy teachers could not explain after buying a couple of courses, your material seems to make everyone enjoy while understanding things.

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

    @The Net Ninja I really want to thank you for your tutorials - I really struggled with creating a menu using flexbox - alot of sleepless nights LOL. You explained it sweetly and simply - shout out to you!

  • @dnickell5343
    @dnickell5343 8 років тому

    Your tutorials are extremely helpful. I refer to them for specific problems and always find the solution. Thanks!

  • @27daninho
    @27daninho 3 роки тому

    His video tutorials learn me so much. It's clear and very detailed. Bought his JavaScript course on Udemy!

  • @csmsml2586
    @csmsml2586 8 років тому +21

    Awesome job, very helpful and informative.

  • @RadioVlaanderenNatio
    @RadioVlaanderenNatio 8 років тому +9

    Great stuff!!!
    I have learned more from you about Flex in 12 relatively short tutorials than I have by reading goodness knows how long articles elsewhere.
    It is fairly simple really.
    Thank you so much for this and for the clear way you explain things.
    By the way, any pointers you can give (or have you got any tutorials about this anywhere?) on how to add dropdown menus while staying within the flexbox method?
    Would be very much appreciated.

  • @omercak2746
    @omercak2746 7 років тому

    I love your videos, short, clean and very helpful. Not like others. And those ninja stuffs are so cool

  • @osempo
    @osempo 6 років тому +2

    That's how i like a code, simple and clean. Thanks a lot!

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

    Hey Ninja,
    Love the video.
    Like how you said ul is the flex container, and li is the flex children. Really helped me understand how to target children from parent. Thanks again!

  • @skfotograf
    @skfotograf 7 років тому +39

    time 4:25, for beginners like me, ( Flex: 1 1 0 ) mean (flex: flex-grow flex-shrink flex-basis) :)
    The Net Ninja, what type of theme You are using in brackets?
    EDIT: Smarth Theme Dark

  • @quentinmckay8658
    @quentinmckay8658 7 років тому +1

    There's also justify-content: space-evenly. Quite useful indeed!. Cheers for the tutorial.

    • @NetNinja
      @NetNinja  7 років тому

      Nice addition... Thanks :)

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

    Thanks a million. the perfect instructor. Systematic, logical, clear and no beating around the bush.
    The justify-content (your code line 45) did not work for me. tried on FireFox and on chrome (both on Ubuntu 18.04). I commented out the flex 1 1 0 and it worked.

  • @mr.richard3109
    @mr.richard3109 7 років тому

    Great tutorial. Just a little note: floating ul elements to the right doesn't change the order of li(s), floating li elements is what causes them to reverse order.

  • @andrewhowe9800
    @andrewhowe9800 8 років тому +1

    As with all your videos, extremely helpful and well explained. Thank you

  • @Mustafa-cv1pk
    @Mustafa-cv1pk 5 років тому +1

    thank you useful and easier than it would be without using flex

  • @lukensonodney5908
    @lukensonodney5908 8 років тому

    These are good tutorials.I'm enjoying them.

  • @visitor_t-w3p
    @visitor_t-w3p 11 місяців тому

    I enjoyed the entire video..loved it truly :D

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

    question: why do you not use a class for the , , etc? is it just because it's redundant?

  • @ebifleck
    @ebifleck 6 років тому

    awesome tutorials! i love em, many thanks for your efforts

  • @menandmice
    @menandmice 7 років тому

    A good tutorial clearly explained. Thank you.

  • @muhammadumer2011
    @muhammadumer2011 6 років тому

    Best tutorial easy and simple.. awesome bro ..

  • @shadower-cs1dv
    @shadower-cs1dv 2 роки тому

    It's so beutifull - i feel happy in my guts. Good work and nice paste to follow

  • @andrewhowe9800
    @andrewhowe9800 8 років тому +7

    Ninja im recommending you for a knighthood, arise SIR.

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

    You. Are. A. DEMIGOD!

  • @ling6701
    @ling6701 8 років тому

    I like the ninja style

  • @iggymach
    @iggymach 7 років тому

    Brilliant! Exactly what I was looking for and very well guided through it! Subscribing right away :-)

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

    Awesome Tutorials as always +++++++++ thank you 🙂🙂

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

    Ninja's spacebar died from its injuries after this tutorial series

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

    Exceptional stuff. Thank you!

  • @Kostek1945
    @Kostek1945 8 років тому +1

    Man , you are THE BEST !

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

    very helpfull it will help me with my midterm :)))

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

    Excellent! Thank you very much!!

  • @antgamer69
    @antgamer69 8 років тому

    Very good job, keep up the good work!

  • @IMKLASH
    @IMKLASH 7 років тому

    Hey man, just found your channel and I have to say a BIG thanks for the videos! Really helping me on my journey to becoming a Web Developer. Quick question, would Flexboxes be the go to method for layouts for you today?

  • @nirajjagdale3483
    @nirajjagdale3483 6 років тому +1

    Awesome sir
    👌👌👌👌

  • @franktielemans6624
    @franktielemans6624 8 років тому

    wow, flexbox is awesome

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

    This is beautiful.

  • @ronneilcamara5071
    @ronneilcamara5071 8 років тому +1

    I really like this one!

    • @NetNinja
      @NetNinja  8 років тому +1

      Glad you like :D

    • @ronneilcamara5071
      @ronneilcamara5071 8 років тому +1

      I hope you can make one more that is advanced like a 3 column layout with header and footer. Left column is for navigation(maybe 200px), center column is where the main space is then rightmost column is also close to 200px and can be used for updates.
      When browser is resized to the same width as cellphones, the left navigation changes from text to icons and can be hidden. The rightmost column goes under the main column. The header stays on top and footer can stay at the bottom or fixed position. It's kinda like a real website/app.
      Thanks a lot! :)

  • @lukensonodney5908
    @lukensonodney5908 8 років тому

    Hello,I'm new in web design and it appears that I fall in love for web designing.I have subscribed on you account.I will keep following you.

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

    Thank you my friend you are the greatest. Thank you so much.

  • @rohanbarman7646
    @rohanbarman7646 7 років тому

    Congratulations ....90k subscribers

    • @NetNinja
      @NetNinja  7 років тому

      Thanks :). Hopefully not long before the big 100K :)

  • @stefanynewman5140
    @stefanynewman5140 8 років тому

    Very cool!
    You are doing a mobile-first approach here, aren't you? With specifying media queries for the bigger screen rather than the other way around?

  • @alexpaulrubinstein2582
    @alexpaulrubinstein2582 7 років тому

    Excellent! Excellent! Excellent! Thank you! Keep it up ! :)

  • @bortokan1784
    @bortokan1784 8 років тому +3

    can i say one thing :
    i am in love

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

    Great tutorials for a beginner! Though I am confused about the Mediaquery..would this now look different on a mobile version and how? Thank you

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

    Thanks a lot brother.

  • @kamyarraza1069
    @kamyarraza1069 7 років тому

    Well done teacher, this is very helpful for me !! , I'm thank you :D

  • @anniekhaliq6292
    @anniekhaliq6292 7 років тому

    this was great!
    thank you!

  • @linasuhail9503
    @linasuhail9503 8 років тому

    thanks very helpful .can i recommend changing upper case in logo cause it hard to read at first glance

  • @redsnakeintown
    @redsnakeintown 8 років тому

    Why did the text align uncommented later worked outside of the media query section ? @ 5:05

  • @richardchristman3765
    @richardchristman3765 7 років тому

    At 4:24 you applied the flex: 1 1 0; to the list items, will you please explain what the last two numbers mean and/or do? Thanks!

  • @yeaseenhossain1101
    @yeaseenhossain1101 7 років тому

    Man, you are just awesome. I have one question. You used this in media query. Can we used this in desktop display and in media query can we use display: block for responsive?

  • @mojoooCo
    @mojoooCo 7 років тому +1

    ty from Russia =) u are rly cool man! =)

  • @salmanahemad3338
    @salmanahemad3338 7 років тому

    Fantastic Video Bro :)

  • @VasilisKar
    @VasilisKar 8 років тому

    You are a king! Thanks

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

    what do you use please ? is it sublime text or not ??? and thanks you

  • @alexanderjoseph5607
    @alexanderjoseph5607 7 років тому

    Great Job man. Quick question.. how could I approach making the Nav stick to the top of the page?

  • @sankyeat
    @sankyeat 7 років тому

    Hi Shaun great tutorial as always! Just a quick question, how come you have both a width of 100% and then also a max-width of 960px on wrapper? Would max width 960px margin 0 auto not be all you would need to center it? Thanks! ( If anyone else knows the answer I would really appreciate it if you could let me know :) ).

  • @geraldfoushee
    @geraldfoushee 6 років тому

    is the navigation in the same flexbox as the main content or are they two different sections ?
    asking because i want the main content box to have padding or space on the sides BUT i want menu to take up entire width of browser. i hope i explained it well. please reply, i follow your javascript tut also. new subscriber.

  • @iAndrewMontanai
    @iAndrewMontanai 8 років тому

    Much thanks!

  • @HaxGuru
    @HaxGuru 6 років тому +1

    I have a question that if I use the justify content and other sub properties of flex on li or a then it doesn't work. Can you please tell me why?

    • @Kira_-lc3ei
      @Kira_-lc3ei 5 років тому

      you need set width for them

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

    Beautiful

  • @malygos1898
    @malygos1898 6 років тому

    Спасибо добрый человек!

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

    In the wrapper class why have width to 100% and max-width to 960px? I get the function of the max-width in order to keep the elements inside in the middle but I don't get the width to 100%

  • @RushJop
    @RushJop 9 років тому +1

    i would really need a lot of help on ruby on rails please! your the best teacher dos far
    #Grateful

    • @NetNinja
      @NetNinja  9 років тому +1

      +Rush Jop Hey, Ruby stuff will come soonish :)

  • @ericwenzke6175
    @ericwenzke6175 8 років тому

    Thank you!

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

    hello.
    i have a question.
    can i use justify-content and flex property together?! or i should use one of them alone?!

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

    thank you helpful

  • @gamedeveloper1440
    @gamedeveloper1440 6 років тому

    Hi i have an problem I made everything what you explained in this video!
    It works in Google Chrome, Opera, Mozilla Firefox, Internet Explorer but there is a problem in Safari! Flex is not working safari! How can I fix this?

  • @Resque.sounds
    @Resque.sounds 3 роки тому

    im having trouble knowing when the nav ul or the nav ul should be targeted for styling. does anyone have any tips that could possibly help me understand more?

  • @KevinCasaberde
    @KevinCasaberde 7 років тому +1

    THE BEST !

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

    Thank you So Much......

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

    cant we add padding when displayed flex ???

  • @apporvaarya
    @apporvaarya 7 років тому

    i cant believe navigation can be coded so easily by flex.

  • @СаняОнишко
    @СаняОнишко 7 років тому

    Thank you)

  • @ilijapavlovic7498
    @ilijapavlovic7498 6 років тому

    i would like to have preview like you.. when i am in css file to show me on browser what am i doing live :)

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

    Wonderful

  • @zk9379
    @zk9379 8 років тому

    Why do you use justify-content: flex-start; for the nav ul when you already say flex: 1 1 0; for the nav li? What does the flex-start achieve in this case? When I comment it out, the style remains the same. Thank you.

    • @selfmademan84
      @selfmademan84 8 років тому

      Z zk you wont need flex-start here because its the default value for the justify-content attribut

  • @zeroxcrusher
    @zeroxcrusher 6 років тому

    After I've put position:fixed on my navbar (which was made with flexbox) it messed EVERYTHING up. It doesn't make any sense. Can someone explain how to use fixed positions with flexbox?

  • @adante407
    @adante407 7 років тому +1

    I have completely followed your code. But for some reason the nav is just stacking on top of each other, and looks the same full screen as it does shrunk. Why? I've gone through it a few times, and still no joy.

    • @arturdomanski7102
      @arturdomanski7102 7 років тому

      make sure there is space after and:
      @media screen and /*insert space here*/ (min-width: 768px)

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

    i didnt understand what does @media screen do in css in general

  • @Remyoha
    @Remyoha 6 років тому

    Please how is your browser refreshing automatically as you make changes on your code?

  • @sora6430
    @sora6430 6 років тому

    How can I add a border on 'nav a:hover' without moving the element?

  • @EdHendrickson
    @EdHendrickson 8 років тому

    What is the editor you are using? and the OS?

    • @NetNinja
      @NetNinja  8 років тому

      +Ed Hendrickson It's Windows 10, and the editor is brackets - brackets.io/ :)

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

    very cool

  • @dalehagar7789
    @dalehagar7789 7 років тому

    What editor are you using in the video?

  • @venkateshachary9416
    @venkateshachary9416 6 років тому

    If i want logo in dat nav then wat should i do

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

    What about space-evenly?

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

    Can we refer to the UL element directly?
    ex:
    ul{
    color: white;
    }

  • @matthiasvanmeerbeek2636
    @matthiasvanmeerbeek2636 7 років тому

    What does *flex: 1 1 0;* ? The first 1 i get, but not the following 2 numbers...

    • @matthiasvanmeerbeek2636
      @matthiasvanmeerbeek2636 7 років тому

      Never mind it is explained in Tutorial #6 (at the end).
      Thank you for these great tutorials!!

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

    Cool

  • @aburaihanrafuz1071
    @aburaihanrafuz1071 6 років тому

    i am from bd.. .its so good

  • @vadymkopitsya7517
    @vadymkopitsya7517 7 років тому

    Nice bro like

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

    But it's not responsive.

  • @pierreleonsimard
    @pierreleonsimard 7 років тому

    is someone here has figured what to do with responsive dropdown menus ?