Build A Responsive Sidebar Menu in HTML, CSS, & Javascript - Beginner

Поділитися
Вставка
  • Опубліковано 29 гру 2024

КОМЕНТАРІ • 117

  • @SaintHanappi
    @SaintHanappi Рік тому +6

    Jesus Christ, absolutely stunning as a beginner. Thank you so much, for your extraordinary and well explained content.

  • @aboutselphy
    @aboutselphy 10 місяців тому +6

    awesome sidebar :) but i would chage all the PX stylings into Rem
    for people with scrolling problems:
    insteat of position: absolute use fixed.
    for the tooltips also dont use position,top,left and transform.
    move the tooltip span into the and in css just add margin-left: 1rem;

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

      I'm wondering, do you keep the nav absolute, don't allow the body to scroll, but allow main-content to scroll with overflow? I think google analytics does something like this.

  • @antoniogomezruiz2700
    @antoniogomezruiz2700 10 місяців тому +1

    Man this tutorial is awesome! Currently I did a backend application, and I am not very familiar to the frontend development, therefore my server looks awful... But with this tutorial my server looks much much better in an instant. I´ve learned a lot with this video about div, classes and ids, now I am testing new views, thanks a lot again!!

  • @zedolok4508
    @zedolok4508 11 місяців тому +1

    man i was searching for something like this, you have no idea how long i search and now i finally learn, i am learning on my own tks man god bless you

  • @geovanyhernandez8640
    @geovanyhernandez8640 Рік тому +9

    Slight modification that I did to the styling for my specific use case.
    Since we are setting the nav-item name's opacity to 0, when collapsed, hovering above its position will trigger the tooltip.
    This took care of that:
    .sidebar .nav-item {
    display: none;
    }
    .sidebar.active .nav-item {
    display: inline-block;
    }
    My nav-item texts are long, so when the tooltip was being triggered, it would keep the 80px as width and increasing the width would increase all the tootips.
    This will help with the dynamic width, plus it helped with alignment:
    .sidebar ul li .tooltip {
    position: fixed;
    ...
    display: none;
    }
    .sidebar ul li:hover .tooltip {
    display: inline;
    }
    Hope this helps anyone who was experiencing the same issues!

    • @johnpaulmejia6259
      @johnpaulmejia6259 11 місяців тому +1

      Wow! Thanks for sharing! I had the same issue when adding space on nav text (2 words).

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

    lot's tutorial on this topic.. but unique in this channel is that with voice guide.. which is very important and also helpful..

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

    Video ini sangat membatu saya sebagai pemula rpl, sangat mudah dipahami sekali, sukse selalu bang CC💪💪

  • @d21gauravbalodi98
    @d21gauravbalodi98 2 місяці тому

    wait up , just because u changed the opacity to 0 it means its just hidden i try to add like a container on the right side it will definetly effect the positioning of the main container , u should make those changes as well i think display none will work instead.

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

    When i go to another site and the sidebar is not active, or the other way, how can i keep it?

  • @rexadvanture
    @rexadvanture 2 місяці тому +1

    somebody please help me my toglle bar dont want to closed, idk why cause im newbie at coding. please help me i cant put main content. if i put it the toggle bar is doesnt wanna closed. im so sory for my english cause iknow it worst

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

    Nice and clean Explanation, thanks for your efforts

  • @peterbridge7519
    @peterbridge7519 6 місяців тому +1

    Being a very beginner this is just what i was looking for!
    However can't get de script working when clicking on btn

  • @basse9914
    @basse9914 Рік тому +2

    Great. How do we add pages though for each one?

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

    I am having an issue, when i'm adding container div and set the property as in video, i can see horizontal scrollbar

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

    Your explanations were very clear. Thank you! Can't wait to see more tutorials on your channel. ❤❤ Love from India..

  • @Lets-Create-1
    @Lets-Create-1 3 місяці тому

    Nice explanation sir
    ❤thanks for sharing

  • @Czjajava
    @Czjajava 2 місяці тому +1

    Amazing sir 🎉🎉🎉 🙏🙏

  • @seancurrie-chicago
    @seancurrie-chicago Рік тому +2

    I'd love to see how to make this kind of side bar in react. I've tried recreating and think im close. But would love to see how you do it.

  • @user-yz2ct2sy3l
    @user-yz2ct2sy3l 7 місяців тому

    26:00 excellent 👌👍

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

    Hey hi, I have a website which is made by html css and js but I want to show that website in desktop view for all devices. Will you plz make a video on this topic or can you please share the code of desktop view for all devices.

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

    This is amazing! Really helped!!

  • @klovvin
    @klovvin 29 днів тому +1

    Manually opening and closing it doesn't mean it's responsive... it needs to automatically pick the state based on screen size

  • @oscarrdy-old
    @oscarrdy-old Рік тому

    How did you get your window controls next to the tabs on your mac?

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

    Can you please extend this for mobile view, where sidebar will open on top of main content

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

    fire and excellent Approach

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

    awesome video. saved my life

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

    ​ @Code Commerce if side menu scroll added in the sense pop-up values are hiding behind the screen can you please help me regarding this?

  • @newfort970
    @newfort970 7 місяців тому

    Brother, one issue, when i resize the height of the window, it clips the bottom menu links. Any fix?

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

    Amazing stuff as always!

  • @arillavigne
    @arillavigne 11 місяців тому

    Thanks for the tutorial bro!
    One question, how to make a dropdown on the sidebar?

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

    Thank you for this bro!

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

    how did you get the divs to fall under each other when writing .sidebar on css?

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

    Awesome work
    How do I add a toogle button??

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

    youbare awesome.... ❤️🔥
    please bring big reactjs project which covers everysingle concept of reactjs 🔥

  • @specialgroup-h8e
    @specialgroup-h8e Рік тому

    dear sir , thanks so much for your effort 😊😊, need help for something if i need to move this project from left to right view , what i need to change in code

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

      In the sidebar styling, so .sidebar {...}, instead of having left: 0; do right: 0;
      Also, you will need to adjust all the other stylings to the right

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

    I’m having issues with the overlay contents for each sidemenu item
    Where do I place the divs

  • @user-yz2ct2sy3l
    @user-yz2ct2sy3l 7 місяців тому

    Do u plan doing that in react js it would be perfect. Also u can show method how to integrate these components irl projects.

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

    Great work 👏

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

    I have a problem with my image, it has the shape of an ellipse instead of circle

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

      I also have this issue when I collapse it

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

      Square the image.

    • @Mars-lx5wn
      @Mars-lx5wn 3 місяці тому

      make sure the .user-img css width matches the height.

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

    Thank you for teaching me

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

    I am facing a problem. Whenever I add a space in the text of tooltip or the nav-item like "Add Question" the tooltip keeps shrinking even if I increase the width or som,ething it remain the same. Could you look into it

    • @odessa.ukraine
      @odessa.ukraine Рік тому +1

      replace opacity: 0 to display: none and opacity: 1 to display: inline

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

    Thank you so muchhhh saved my life :D

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

    Thank you so much!!

  • @Fth.44
    @Fth.44 11 місяців тому

    Çok teşekkür ediyorum sağ ol.

  • @nahuelpiguillem2949
    @nahuelpiguillem2949 7 місяців тому

    Thank you very much mannnn

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

    you didnt mention when it will goes on mobile how it will behave?

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

    Good stuff. Its a sub.
    Lets see what other goodies you have on the channel.

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

    awesome video, thank you. One question: how can we make this sidebar sticky so that it is visible when you scroll the page?

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

    In react app Tailwind css classes doesn't work when I pass through props in component as bgc="red" -> className={`bg-${props.bgc}-500`} but work if I pass whole class name like "bg-red-500"
    One more thing if I use cdn link of tailwind css then it works but not with installed tailwind css
    I've read somewhere that tailwind doesn't support dynamic classes it compile only given classes...
    What to do
    Please reply . . .

    • @Hacking-NASSA-with-HTML
      @Hacking-NASSA-with-HTML 2 роки тому

      Just use cdn then if it works 🤷🙂

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

      @@Hacking-NASSA-with-HTML but what if I've to build classes and at last when I will run npm build it will miss the undefined classes

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

    Nice keep going

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

    tq, very helpfull

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

    Thank you

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

    Great video as always! Any plans to do a Shopify development tutorial?

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

      I haven’t really, but I do have quite a bit of experience with Shopify.

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

    Hey bro, can you make a spaceX clone using ReactJS/NextJS and Tailwindcss/Material UI. It will be super challenging and fun 🤟🏻✌🏻

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

      Will do! They have an awesome site!

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

      @@codecommerce yes 👍🏻✌🏻

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

    Thank you!

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

    Not working collapse in bootstrap 5

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

    Could you make a ecommerce shop from top to bottom with built in stripe api maybe? Nextjs and tailwindcss with the new 13v of nextjs with font optimization etc?

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

      React > next js

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

      @@JJ25Flo next js is a react framework my guy with alot more advantage over pure react. next js handles routing by default, increase SEO which helps to increase search index along and with many more stuff

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

      @@speedster784 oh really, so you suggest someone who recently been building on react eventually transition to nextJS ?

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

      They are very similar. No need for react-router for multi-page apps when using NextJS. :)

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

    Very good bro

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

    Hi guys, I'm having challenge here, I'm getting this error:
    Uncaught
    TypeError: Cannot set properties of null (setting 'onclick')
    After adding this code piece:
    let btn = document.querySelector('#btn');
    let sidebar = document.querySelector('.sidebar');
    btn.onclick = function () {
    sidebar.classList.toggle('active');
    };
    What could be the problem.

    • @Mars-lx5wn
      @Mars-lx5wn 3 місяці тому

      make sure the script block is inserted after the body end tag but before the end html tag . This way all the html elements will be loaded before the script.

  • @Rohan-n5z
    @Rohan-n5z 11 місяців тому +1

    Can you provide you code? (a.k.a what you wrote for your code)

    • @codecommerce
      @codecommerce  11 місяців тому

      ah sorry, I'm not sure I saved this one..

    • @Rohan-n5z
      @Rohan-n5z 11 місяців тому

      @@codecommerce If you can, can you follow what you did and do it?

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

    Plzz make ecommerce project in tailwind css with Redux toolkit plz bro becuz there is no ecommerce project in your channel so am waiting for your response

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

    Just think about you and notification drop

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

    user-img not vorking 😢

  • @lolilol.
    @lolilol. 11 місяців тому

    dont you have a download pls ?

    • @Mars-lx5wn
      @Mars-lx5wn 3 місяці тому

      Clint answered that in this comment section somewhere that he didn't save the code.

  • @syauqihusin12
    @syauqihusin12 11 місяців тому

    Id is not working anymore

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

    Great to see html and css tutorials
    You can’t use tailwind if you don’t know how to use css so thank you very much 👍🏽

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

      Thank you Sharif. You’re 100% right. Tailwind would be difficult if you don’t first understand CSS.

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

      You cant use react if you dont know javascript
      People sometimes forget about the roots

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

    salamat lods

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

    Where's the download?

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt 2 роки тому

    nice bro

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

    nice

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

    source code?

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

    Source code plz.

  • @JullianGeraldizo
    @JullianGeraldizo 9 місяців тому

    8:11

  • @indraxios
    @indraxios Рік тому +4

    source code please

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

    @codecommerce, the .sidebar.active ~ .main-content is not working for me :")
    I hope you can explain more about the .sidebar.active.
    from my understanding, .notation is used to access class but this time, you have .active. so it's different

  • @ghassenbeddouihech2657
    @ghassenbeddouihech2657 10 місяців тому

    code source ?

  • @NJUGUNAJAMESKARIUKI
    @NJUGUNAJAMESKARIUKI 10 місяців тому

    👌👌👌👌💪💪💪👍👍

  • @helloworld4147
    @helloworld4147 10 місяців тому

    This is not responsive right? There are not any media Querries used

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

    Surprised there isn’t a project video about e-commerce given that your name is code commerce lol

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

      Haha funny - most ecommerce now days is styling within shopify, wordpress, or bigcommerce.. I guess I could do a theme with shopify or wordpress. :)

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

    Create a rubike's cube app

  • @Vedkumar-v2w
    @Vedkumar-v2w Рік тому

    nice

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

    source code please