FLEXBOX Responsive Navbar (with Logo) | Navigation Menu Bar with HTML, CSS & JavaScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ค. 2024
  • Learn how to create a responsive navbar step by step by using HTML, CSS, and Flexbox. There are many different methods of creating navigation menus in frontend development. In this video, you're going to learn how to build a very simple responsive navigation bar with Flexbox. You'll also see why using flexbox of CSS is beneficial for building responsive navbars.
    Since the video is long, I've divided it into the following multiple sections:
    (00:00) - INTRO
    (00:30) - Creating the HTML Template
    (01:30) - Styling the Navbar
    (07:30) - Adding an example LOGO
    (08:35) - Adding the Responsive Nav Menu Icon
    (10:20) - Defining Media Queries for Mobile View
    (11:00) - Building the Mobile Navigation Menu
    (14:20) - Adding Functionality with JavaScript
    Link for my other CSS Flexbox Tutorials: • CSS Flexbox Tutorials ...
    Credits:
    Logo Website: www.flaticon.com
    Logo Creator: www.flaticon.com/de/autoren/f...
    #navbar #responsivedesign #flexbox #html #css #flexbox #javascript

ความคิดเห็น • 76

  • @well6ess
    @well6ess 2 ปีที่แล้ว +5

    You have no idea how happy I am lol. CSS positioning will drive you crazy, you've simplified it wonderfully. I'll finally be able to easily center my header!

    • @cemeygimedia
      @cemeygimedia  2 ปีที่แล้ว

      Thank you so much, keep up the good work! 👍

  • @fajfaj8466
    @fajfaj8466 2 ปีที่แล้ว +1

    Exactly what I needed, straight to the point. Thanks!

  • @ufoteacher
    @ufoteacher ปีที่แล้ว +1

    Extremely helpful! I have become an avid viewer of your tutorials on HTML and CSS. Much appreciated. I am feeling much more confident after learning from your videos. Please keep doing more videos.

  • @frankalvarez7513
    @frankalvarez7513 2 ปีที่แล้ว

    Thank you for teaching us the basics of a navbar! Great video Sir!

  • @anaisa7192
    @anaisa7192 2 ปีที่แล้ว +1

    Thank you so much, very clear explanations and nice to listen to!

  • @ewenwong6222
    @ewenwong6222 2 ปีที่แล้ว +1

    Clear instruction andvery very informative! Great work!

  • @well6ess
    @well6ess 2 ปีที่แล้ว

    One of the BEST aspects of this marvelous tutorial is the use of developer tools. CSS positioning is inherently difficult at first, and the developer tools let you SEE each element's space/padding/alignment because the space is highlighted when you pass the cursor over the or , etc. Hence you see very quickly if you are in error, instead of not understanding why your change isn't working as expected.

  • @adamkollat5924
    @adamkollat5924 2 ปีที่แล้ว +1

    Great video, exactly what I needed. Thank you.

  • @kashif-kazmi2050
    @kashif-kazmi2050 2 ปีที่แล้ว +2

    Very informative, straight forward and clear explanation.
    Bundle of thanks for this video ✨❤️

  • @bellsnow2386
    @bellsnow2386 3 ปีที่แล้ว +1

    This is what I'm looking for! Thankyou so much! ❤️ You got a New sub here :)

  • @shashankkhandelwal4559
    @shashankkhandelwal4559 2 ปีที่แล้ว

    Such an amazing tutorial... Thanks a lot for this one.

  • @jamesi.o1676
    @jamesi.o1676 2 ปีที่แล้ว

    I finished learning HTML, got stuck on css, mostly the navbar. Watched a lot of videos but those dudes just show they know how to code and not actually teaching.
    But today i came across your video and i understood every thing...... i subscribed already, and gave a like.
    Thanks for this tutorial, looking forward for more on web design coding.
    Thanks once more...

  • @meryemar7403
    @meryemar7403 3 ปีที่แล้ว

    kullanici ismine bakmadan menu deyisinden turk oldugunu anladim. harikasin cem cok guzel bir video olmus eline saglik.

  • @vinnym9479
    @vinnym9479 2 ปีที่แล้ว

    I wish u were my tutor in boot camp. Slick, clear & to the point, fantastic

  • @ralitsayordanova4443
    @ralitsayordanova4443 22 วันที่ผ่านมา

    thaks a lot!!!!because of your video i did a great job!!!

  • @dulcedeinvierno1
    @dulcedeinvierno1 2 ปีที่แล้ว

    You explain very clearly🤗 thanks

  • @sayyedmudassar
    @sayyedmudassar 3 ปีที่แล้ว +4

    Amazing work. I would like to know can we make the list items cover whole available space below the logo and hamburger. If phone is in landscape mode or portrait mode the list items should cover full screen. Can you please show how to achieve it, if possible a sequel to this video :)

  • @shamaiunkabir
    @shamaiunkabir ปีที่แล้ว

    Extremely helpful! Please keep doing more videos.

  • @dinero2131
    @dinero2131 2 ปีที่แล้ว +3

    HELP
    When inputting the code below the lists does not inline block. I have the .
    .nav-list .list-item {
    display: inline-block;
    }

    • @basithsalman9590
      @basithsalman9590 ปีที่แล้ว +3

      i think it should be .nav-list li { display: inline-block; }

  • @FullerUK
    @FullerUK 2 ปีที่แล้ว

    Thanks a lot dude. Great tutorial!

  • @oladimejisundaymichael4079
    @oladimejisundaymichael4079 2 ปีที่แล้ว

    Thanks for this video! The best I've watched. It's so good❤😇

  • @AbinashPanigrahi011
    @AbinashPanigrahi011 2 ปีที่แล้ว

    Thanks a lot for your video. Helped me a lot in my project.

  • @henryamusah1396
    @henryamusah1396 2 ปีที่แล้ว

    Thank you so much for this❤

  • @quintenmantez6934
    @quintenmantez6934 2 ปีที่แล้ว

    Nice tutorial! Thx!

  • @Nakazera
    @Nakazera ปีที่แล้ว

    Thanks a lot, perfect tuto !

  • @burgasdragonheirsilentgods
    @burgasdragonheirsilentgods 3 ปีที่แล้ว +2

    Fantastic work and video ! Keep going !

  • @aman09ization
    @aman09ization 2 ปีที่แล้ว +1

    if this didn't work for you, try changing the active class to display:none, worked for me thank you for such awesome content.

  • @nkanmuoverachioma8078
    @nkanmuoverachioma8078 2 ปีที่แล้ว

    Oh wow, you are a good teacher. thanks for this, one more subscriber to the list

  • @geee7672
    @geee7672 2 ปีที่แล้ว

    I have never called anyone a master. But you are a bible and a dictionary. and I have subscribed.

  • @jujlarage
    @jujlarage 2 ปีที่แล้ว

    thankssss so much !!

  • @1thapelo
    @1thapelo 2 หลายเดือนก่อน

    great tutorial, I thank you.
    Please help me with 2 things
    1. how to add an active class to highlight the current page
    2. add a transition on the mobile menu collapse
    the best easy tutorial by far

  • @mshahalam3362
    @mshahalam3362 3 ปีที่แล้ว

    Thanks brother

  • @akebengtsson1223
    @akebengtsson1223 2 ปีที่แล้ว

    How do I keep visual stuido code on top even when touching chrome, is there a way to have it always on top?

  • @aysuncodes
    @aysuncodes 3 ปีที่แล้ว

    wow awesome

  • @balaji7564
    @balaji7564 3 ปีที่แล้ว +1

    Good and easy tutorial!

  • @jousufjacob8251
    @jousufjacob8251 2 ปีที่แล้ว

    nice work man,

  • @gambo2003
    @gambo2003 3 ปีที่แล้ว

    Amazing work Cem. Like always perfect !!!! ;) Cem to the moon ;) see ya my friend

    • @cemeygimedia
      @cemeygimedia  3 ปีที่แล้ว

      Thank you so much for always being supportive! :)

  • @jenniferward6821
    @jenniferward6821 3 ปีที่แล้ว

    Fabulous

  • @cafecito_tattoos5323
    @cafecito_tattoos5323 ปีที่แล้ว

    thanks🙏

  • @KuroNeko-gp8kh
    @KuroNeko-gp8kh 2 ปีที่แล้ว

    thanks a lot,

  • @AbinashPanigrahi011
    @AbinashPanigrahi011 2 ปีที่แล้ว

    Amazing

  • @mehdical5081
    @mehdical5081 2 ปีที่แล้ว +1

    hey i have a problem on the js part i did the dame thing but when i click it doesnt display the menu :(
    can you help me

  • @debrad.castleberry2457
    @debrad.castleberry2457 3 ปีที่แล้ว

    Thanks

  • @thepowerhouse7337
    @thepowerhouse7337 2 ปีที่แล้ว

    Excellent tutorial! Thank you for your time and good explanation.

  • @ZidaxGaming
    @ZidaxGaming 2 ปีที่แล้ว

    Hi!
    May I ask what program you are using to code that has real time preview?

    • @cemeygimedia
      @cemeygimedia  2 ปีที่แล้ว

      i use vs code and its live preview extension

  • @Tawbahquest
    @Tawbahquest 2 ปีที่แล้ว +1

    hello @cem eygi media tesekurler for your video, please im copying the same code by the display: inline-block; is not working for me

  • @eirlysinthedark
    @eirlysinthedark ปีที่แล้ว

    When I click on the hamburger menu my list is not vertical, it remain horizontal but i put Display: block; how can i resolve it? Thank you :)

  • @thelittleattic1888
    @thelittleattic1888 3 ปีที่แล้ว

    which app are you using?

  • @sagarbharati1438
    @sagarbharati1438 3 ปีที่แล้ว +1

    so nice video. can you please explain me 16:56 how classList came there. thank you

    • @cemeygimedia
      @cemeygimedia  3 ปีที่แล้ว +1

      Thank you :) That's a built-in JS property. See here for more: www.w3schools.com/jsref/prop_element_classlist.asp

  • @mdmerchant8748
    @mdmerchant8748 2 ปีที่แล้ว

    nice video sir!
    please explain how to make logo and list item float to the corners?

    • @munandisichali605
      @munandisichali605 2 ปีที่แล้ว

      He used the position elements in the video, you can cross check again

  • @thegamertorq
    @thegamertorq ปีที่แล้ว

    GL bro

  • @wshacode7179
    @wshacode7179 2 ปีที่แล้ว

    i wish you could add animation to this opening navbar

  • @yuriyzadorozhnyi3849
    @yuriyzadorozhnyi3849 ปีที่แล้ว +1

    Привіт з України ! Дякую друже , це було круто , підписався на ваш канал , у вас багато цікавого для мене як початківця у справі програмування !

    • @hajhammereaux
      @hajhammereaux ปีที่แล้ว +1

      Слава Украïнi!

  • @Jazzzi82
    @Jazzzi82 ปีที่แล้ว

    Hmm, the inline-block doesn't change anything for me. Still a vertical list for me. Adding inline-flex under .nav-list only does make it a horizontal list. Not sure what's wrong.

    • @chiaraalfano2462
      @chiaraalfano2462 ปีที่แล้ว

      Hey, did you make sure you added the list-item class in each list item? I had the same problem and then realized I'm an idiot haha

  • @sapphiresky9603
    @sapphiresky9603 2 ปีที่แล้ว

    So the navbar is not separate to the flex box, you are just stretching the nav bar - would have been good if the flex box was able to stretch and adjoined with the navbar.

  • @sabarinathan3271
    @sabarinathan3271 2 ปีที่แล้ว

    Sir I have an error that is cannot read properties of null (reading ' addEventListener')

  • @TheMaP142
    @TheMaP142 ปีที่แล้ว

    Nah, too

  • @dehoussemarcel206
    @dehoussemarcel206 2 ปีที่แล้ว

    Merci pour ce tuto excellent.
    J'ai une navigation dropdown multilevel mais pas en flexbox. je voudrais savoir si je dois aussi mettre le display flex au submenu ?
    merci.
    code:
    @charset "UTF-8";
    .navigation {V
    height: 70px;
    background: #262626;
    }
    .brand {
    position: absolute;
    padding-left: 20px;
    float: left;
    line-height: 70px;
    text-transform: uppercase;
    font-size: 1.4em;
    }
    .brand a,
    .brand a:visited {
    color: #ffffff;
    text-decoration: none;
    }
    .nav-container {
    max-width: 1000px;
    margin: 0 auto;
    }
    nav {
    float: right;
    }
    nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    }
    nav ul li {
    float: left;
    position: relative;
    }
    nav ul li a,
    nav ul li a:visited {
    display: block;
    padding: 0 20px;
    line-height: 70px;
    background: #262626;
    color: #ffffff;
    text-decoration: none;
    }
    nav ul li a:hover,
    nav ul li a:visited:hover {
    background: #2581DC;
    color: #ffffff;
    }
    nav ul li a:not(:only-child):after,
    nav ul li a:visited:not(:only-child):after {
    padding-left: 4px;
    content: " ▾";
    }
    nav ul li ul li {
    min-width: 190px;
    }
    nav ul li ul li a {
    padding: 15px;
    line-height: 20px;
    }
    .nav-dropdown {
    position: absolute;
    display: none;
    z-index: 1;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    }
    /* Mobile navigation */
    .nav-mobile {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    background: #262626;
    height: 70px;
    width: 70px;
    }
    @media only screen and (max-width: 798px) {
    .nav-mobile {
    display: block;
    }
    nav {
    width: 100%;
    padding: 70px 0 15px;
    }
    nav ul {
    display: none;
    }
    nav ul li {
    float: none;
    }
    nav ul li a {
    padding: 15px;
    line-height: 20px;
    }
    nav ul li ul li a {
    padding-left: 30px;
    }
    .nav-dropdown {
    position: static;
    }
    }
    @media screen and (min-width: 799px) {
    .nav-list {
    display: block !important;
    }
    }
    #nav-toggle {
    position: absolute;
    left: 18px;
    top: 22px;
    cursor: pointer;
    padding: 10px 35px 16px 0px;
    }
    #nav-toggle span,
    #nav-toggle span:before,
    #nav-toggle span:after {
    cursor: pointer;
    border-radius: 1px;
    height: 5px;
    width: 35px;
    background: #ffffff;
    position: absolute;
    display: block;
    content: "";
    transition: all 300ms ease-in-out;
    }
    #nav-toggle span:before {
    top: -10px;
    }
    #nav-toggle span:after {
    bottom: -10px;
    }
    #nav-toggle.active span {
    background-color: transparent;
    }
    #nav-toggle.active span:before, #nav-toggle.active span:after {
    top: 0;
    }
    #nav-toggle.active span:before {
    transform: rotate(45deg);
    }
    #nav-toggle.active span:after {
    transform: rotate(-45deg);
    }
    article {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
    }

  • @kriptoparam
    @kriptoparam ปีที่แล้ว

    niye türkçe konuşmuyon? yoksa bizi beğenmiyon mu

  • @mar-tin702
    @mar-tin702 ปีที่แล้ว

    Shouldn't that be inside header

  • @tankapdsharma8177
    @tankapdsharma8177 ปีที่แล้ว

    please give us your instagram id for further references,doubts and for clarification..

  • @ARShaikh515
    @ARShaikh515 2 ปีที่แล้ว

    Thanks