How to create a CSS navigation bar in 6 minutes! 🧭

  Рет қаралды 386,831

Bro Code

Bro Code

Күн бұрын

Пікірлер: 181
@BroCodez
@BroCodez Жыл бұрын
Bro Code Bro Code Home About Products Contact This is the Home page Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsam minus eveniet recusandae dicta similique numquam voluptas quos tempore cupiditate pariatur, laudantium fugit alias quia veritatis nesciunt quaerat molestias adipisci assumenda. /* style.css */ body{ margin: 0px; } main{ margin-left: 20px; margin-right: 20px; } h1{ text-align: center; } .navbar ul{ list-style-type: none; background-color: hsl(0, 0%, 25%); padding: 0px; margin: 0px; overflow: hidden; } .navbar a{ color: white; text-decoration: none; padding: 15px; display: block; text-align: center; } .navbar a:hover{ background-color: hsl(0, 0%, 10%); } .navbar li{ float: left; }
@emmanuelanallemina4321
@emmanuelanallemina4321 Жыл бұрын
How to I copy the code
@rayyanabdulwajid7681
@rayyanabdulwajid7681 11 ай бұрын
It's better to use display flex than float.
@iamaffan090
@iamaffan090 9 ай бұрын
i like it
@walidwalid1669
@walidwalid1669 8 ай бұрын
Thank you 🎉
@Nocontenthere1039
@Nocontenthere1039 7 ай бұрын
Brotha, where is the CSS file?! I really need it for my new project 😢😅
@StopWhining491
@StopWhining491 Жыл бұрын
You've got the best step-by-step videos. Thanks for all your work and sharing.
@shanepelletier2347
@shanepelletier2347 9 ай бұрын
for anyone trying to make this responsive: body{ margin: 0px; } main{ margin-left: 20px; margin-right: 20px; } h1{ text-align: center; } .navbar{ background-color: hsl(0, 0%, 25%); } .navbar ul{ list-style: none; padding: 0px; margin: 0px; display: inline-flex; } .navbar a{ color: white; text-decoration: none; padding: 15px; display: block; text-align: center; } .navbar a:hover{ background-color: hsl(0, 0%, 10%); } this uses flexbox and added .navbar{} so the background color stretches across the webpage
@flinch9710
@flinch9710 9 ай бұрын
You're a lifesaver. Thanks!
@Kieselsteo
@Kieselsteo 2 ай бұрын
Yo bro it seems like u know about this. Can u help me with something ? I did everything like in the video but my Navigation Bar is not going horizontally. So picture it like that. It is vertically and the elements still take up the entire lenght of the browser as if they were div elements. How do I solve this bc I literally made everything exactly like in the video ...
@1stlyrics-s9c
@1stlyrics-s9c 26 күн бұрын
This video humbles me lol. I do a lot of style, while this guy just make it simple and efficient. goodwork
@richardolajiga3176
@richardolajiga3176 Жыл бұрын
This guy is too good with his explanations
@l-fitness3590
@l-fitness3590 Жыл бұрын
It’s straight to the point and easy to understand definitely one of the best
@devd3
@devd3 Жыл бұрын
bro cooked and I ate
@Fl_ninja
@Fl_ninja Жыл бұрын
💯 Every vid
@Enryu071
@Enryu071 Жыл бұрын
Yum
@Luxorafashion000
@Luxorafashion000 8 ай бұрын
I Also Eat but I learn the recipe as well
@evanauli8092
@evanauli8092 8 ай бұрын
ZANKS ZQADDDYIE
@rizwinrz8468
@rizwinrz8468 8 ай бұрын
😂😂
@Legomaniac359
@Legomaniac359 11 ай бұрын
Straight to the point. Thank you!
@jakry_apexlegends
@jakry_apexlegends Жыл бұрын
You are a gentleman and a scholar. Thanks
@Freeteechingresiurce87409
@Freeteechingresiurce87409 Жыл бұрын
Very good person
@supreme_wx2499
@supreme_wx2499 7 ай бұрын
IVE BEEN LOOKING FOR THIS SO MUCH. Im so glad l found you bro
@maricarlacerna5841
@maricarlacerna5841 Жыл бұрын
Finally! A working code! thank you very much for this @Bro Code you save me from failling
@waltermitty4132
@waltermitty4132 9 ай бұрын
I don't understand why you added "overflow:hidden" to the CSS file? What is its purpose in this navbar?
@realnoscope
@realnoscope 9 ай бұрын
so it doesn't show a scroll bar on the nav bar
@InterestingLake
@InterestingLake Ай бұрын
Awesome tutorial, thanks!
@deborahtshiyeya307
@deborahtshiyeya307 7 ай бұрын
Thank you for explaining while showing us how to do it. This makes it easier to understand. You are the best❤❤
@user-dk9of1ok1n
@user-dk9of1ok1n 7 ай бұрын
You are the best Bro. Stay blessed 🙌
@happytofu5
@happytofu5 2 ай бұрын
Oh man already the third video I watch from you today. You really cover it all, thanks bro!
@GirlActober
@GirlActober Ай бұрын
I want to do options and in inside the options do another option, how can I do it??
@happytofu5
@happytofu5 Ай бұрын
@@GirlActober I found the video "The Only CSS Layout Guide You'll Ever Need " by EdRoh very helpful on how to do layouts
@GirlActober
@GirlActober Ай бұрын
@ اين يمكنني ان اجده ؟
@GirlActober
@GirlActober Ай бұрын
@ where can I find this?
@happytofu5
@happytofu5 Ай бұрын
@@GirlActober its here on youtube, I can't link it though because youtube deletes comments with links, just search for the title
@mr.shredder5430
@mr.shredder5430 Жыл бұрын
just the thing i needed thanks for sharing this content👍
@yehohanan7738
@yehohanan7738 8 күн бұрын
Thanks for this tutorial ❤❤❤
@CapDrew
@CapDrew 3 ай бұрын
Great explanation. You made that look easy, I just have to make a couple of these to get it down so I don't forget.
@asa-od9pu
@asa-od9pu 9 ай бұрын
How do I center the navigation br in the center of my webpage, it wants to all shift to the side but I want it to be about 100 pixels long and center with h1
@amandapanda3750
@amandapanda3750 11 ай бұрын
Thanks so much. I've been searching for sooo long to find out how to do this.
@asalmda7010
@asalmda7010 4 ай бұрын
BRO YOU'RE AMAZING, HELPING ME SO MUCHHHH, THANK YOUUUU
@bamanbamni
@bamanbamni Жыл бұрын
it is important to use main (can we use a div instead of main for main content )
@ShaddieMello
@ShaddieMello 3 ай бұрын
Bro code is elusively elegant as ever
@biggstreams
@biggstreams 18 күн бұрын
great video!
@SmartKhani786
@SmartKhani786 3 ай бұрын
wow great work you've done❤ i subscribed your channel.
@amitcoc7840
@amitcoc7840 10 ай бұрын
Best teacher 🧑‍🏫
@ØgbDêcênt
@ØgbDêcênt Ай бұрын
Thanks man you're our a real bro 💪
@asterinology
@asterinology 8 ай бұрын
the tutorial is simple and straightforward. thank youuuuuu❤❤❤
@abdullahbiswas1
@abdullahbiswas1 Жыл бұрын
Thank you for the content
@Procode-w2r
@Procode-w2r 4 ай бұрын
you should be my coding teacher keep it up
@3210egh
@3210egh 6 ай бұрын
It helped me a lot. Thank you very much. Let's take a follow-up lecture. Lee Jong-hoon from the coast
@OceanFanatic
@OceanFanatic 6 ай бұрын
Helpful video. Thank you
@Asulescu
@Asulescu 10 ай бұрын
May god bless you ! Thank you save my life seriously
@ayannasir6653
@ayannasir6653 Жыл бұрын
Make a video on how to put "LOGO" and adjust its height and width using "CSS" with according to our needs?
@Pankajweb996
@Pankajweb996 6 ай бұрын
Exactly same problem i was facing😂
@Thegoal2.P
@Thegoal2.P 6 ай бұрын
@@Pankajweb996 just use img
@dmojela1625
@dmojela1625 11 ай бұрын
Best teacher.... 👌
@PriggarGaming
@PriggarGaming 12 күн бұрын
I wish i found 2 years ago... I made a website for school I literally just used h1 and out hyperlinks in it... Because i didn't knew anything at all... Well... Atleast its helping me now that I am in college and now have to study the same as i did last time Because i don't know University make that syllabus that way... And now i am finally learning something i took lazy way out in class 10
@gian-mm9kr
@gian-mm9kr Жыл бұрын
How can I center the nav bar ? the only way i was able to get was creating a div section.
@Blu3ligh7
@Blu3ligh7 6 ай бұрын
100/10 great video!
@louismario66
@louismario66 25 күн бұрын
Question...what if you want the home to be at the right by the extreme end and the contact at the left extreme end while the product and about at the middle How will you do it?
@MdHossainAhmed-sc4ui
@MdHossainAhmed-sc4ui 11 ай бұрын
Very helpful video
@HafeezKhan-it3bl
@HafeezKhan-it3bl 2 ай бұрын
Bro your crazy man I like you thanks for help ❤️❤️
@Thals_MK
@Thals_MK Жыл бұрын
THANKS I NEEDED THIS SO MUCH FOR SCHOOL PROJECT🎉🎉🎉🎉🎉
@Tempest28000
@Tempest28000 2 ай бұрын
Hi! Senior high school student here! You dropped this king 👑 🗿
@iangabriel1031
@iangabriel1031 Жыл бұрын
This is what i need!! Thank you so much bro i will subscribe you
@domlosurdo3432
@domlosurdo3432 16 күн бұрын
Tough. I was not aware of the nav element and also did not do a ul. I did it the hard (and stupid, apparently) way of setting up individual buttons to create a horizontal navbar. It looks and functions the same but is a lot of extra code. Good news is I learned a lot from it :)
@VijaykumarA-o8v
@VijaykumarA-o8v 10 ай бұрын
Hi Bro Codez, Your tutorials is awesome. Please clarify my doubt, Some of the using Flexbox and Grid to align the navbar button but you didn't use that so please explain which is correct.
@felcynchannel840
@felcynchannel840 9 ай бұрын
I believe you want to use flex box to make it more responsive
@JanviMali155
@JanviMali155 8 ай бұрын
Amazing work
@mohaimenpotawan2842
@mohaimenpotawan2842 9 ай бұрын
very kind blogger
@princeshukraan3099
@princeshukraan3099 9 ай бұрын
Very good,I love him
@hertechera
@hertechera 10 ай бұрын
Appreciate this, thank you
@prithurajvidyadas2850
@prithurajvidyadas2850 Жыл бұрын
why did u use "overflow:hidden" can u explain that part like what did u hide exactly?
@omairtech6711
@omairtech6711 Жыл бұрын
I want an answer to this as well. He did not explain at all.
@devd3
@devd3 Жыл бұрын
it prevents horizontal scrolling
@memefromtheinternet
@memefromtheinternet Жыл бұрын
@@devd3 thanks I also needed that
@pholcastaneda3699
@pholcastaneda3699 Жыл бұрын
@@devd3 But why does setting the property float:left make it disappear? I don't get it
@cuteminired6550
@cuteminired6550 10 ай бұрын
Yes exactly ​@@pholcastaneda3699
@sanjayagnihotrii5126
@sanjayagnihotrii5126 7 ай бұрын
amazing brooo thumbs up for bro code share
@muhammadsulaiman4153
@muhammadsulaiman4153 Ай бұрын
Thank you sir ❤
@arunimarajesh6144
@arunimarajesh6144 6 ай бұрын
Why did float:left and overflow: hidden make the nav bar horizontal? 4:05
@sandy_mind
@sandy_mind 4 ай бұрын
I also have the same doubt someone clear it
@joseluisMartin
@joseluisMartin 2 ай бұрын
I've got a question, how did you add style.css to the new tab? Thank you.
@NeerajKumar-j8y7b
@NeerajKumar-j8y7b 4 күн бұрын
The navigation and CSS styling in not working on a chrome book. What could be the reason?
@yashaswimohod9647
@yashaswimohod9647 10 ай бұрын
Can you make a proper responsive website. It will be easy to add in my projects.😉
@NnFace-ql3jo
@NnFace-ql3jo Жыл бұрын
best coder
@chigozie6333
@chigozie6333 5 ай бұрын
Thank you Bro Code. I practised this tutorial and observed that when i floated the navigation bars RIGHT the navigation bars were not arranged in sequence as described in the script. I had no problem when i floated LEFT. How can i correct this?
@paIeville
@paIeville 3 ай бұрын
maybe instead of using the float and overflow properties like he did, try using display:inline on the li elements and using text-align:right on the ul. but i cant test rn so dont know if it works edit: worked for me
@GirlActober
@GirlActober Ай бұрын
I want to do options and in inside the options do another option, how can I do it??
@AdeelAhmad0007
@AdeelAhmad0007 7 ай бұрын
Nice Video
@nickpage1575
@nickpage1575 6 ай бұрын
thank you for this! i am battling constructing a website for my web development course and i am struggling pretty badly. Now i need to fight ad figure out how to create the other sections of my site and link them to the main page...Any tips?
@kiddReyes
@kiddReyes 10 ай бұрын
If I want to float right why does my words reverse
@suyashman7964
@suyashman7964 Жыл бұрын
Epic bro
@Games-games506
@Games-games506 Жыл бұрын
you are legend - thanks
@Angle_gamer980
@Angle_gamer980 4 ай бұрын
Which text editor you have installed?
@AdeelAhmad0007
@AdeelAhmad0007 7 ай бұрын
amazing
@hitoshiasakura9109
@hitoshiasakura9109 2 ай бұрын
Bro explained it way more precise
@NaftaliKipkoech
@NaftaliKipkoech Жыл бұрын
Bro had to earn my subscription and he did it
@jokosinh
@jokosinh 5 ай бұрын
Interesting
@SpongeknobSquarenut
@SpongeknobSquarenut 11 ай бұрын
instead of using colors for navigation bar can i use images?
@ayeshasiddika1252
@ayeshasiddika1252 10 ай бұрын
great
@arthurlabrador916
@arthurlabrador916 Ай бұрын
Thank you
@ayushlimbu8044
@ayushlimbu8044 11 ай бұрын
Thanks bro!
@AmmarAlBalawi-o1b
@AmmarAlBalawi-o1b Ай бұрын
how i turn it in button and make it work ?
@asifirtezaratul3893
@asifirtezaratul3893 6 ай бұрын
Bro can you explain the "overflow: hidden" part? How did that fix the problem there?
@karol3209
@karol3209 5 ай бұрын
So it doesn't show a scroll bar on the nav bar.
@agonluta9672
@agonluta9672 3 ай бұрын
When you use float: left; on the elements, the parent no longer recognizes the height of its floated children, because floats are taken out of the document flow. As a result, the collapses, and the background color of the disappears, making it look white (or transparent). When you add overflow: hidden; to the .ul1, it forces the parent to recognize the height of its floated children again. This works as a kind of hack to "clear" the floats without needing to manually add a clearfix. Here's why it works: overflow: hidden; makes the container expand to enclose its floated children, solving the collapsing issue without needing to apply the more explicit clearfix methods. Why the overflow: hidden; works: Without it: Floated elements are removed from the normal flow of the document. The container doesn't stretch to wrap around its floated children, causing it to "collapse" in terms of height. With it: The overflow: hidden; forces the container to calculate its dimensions based on the floated elements inside it, so it correctly stretches to enclose its content.
@watsonhaymont
@watsonhaymont 4 ай бұрын
thumbs .. nailed it ! lol
@mrvivekofficial.0
@mrvivekofficial.0 8 ай бұрын
Nice bro
@bonnimahitani4998
@bonnimahitani4998 4 ай бұрын
yo what website editor u using
@johnvincentbaguion8338
@johnvincentbaguion8338 8 ай бұрын
When we are outting "padding" its turning red, not blue
@Yeager_001
@Yeager_001 5 ай бұрын
Bro code ❌ Pro code ✅🤩🥵
@nathansimelane562
@nathansimelane562 10 ай бұрын
What have I done wrong because my display:block and text align center is not working
@hamzeizmail442
@hamzeizmail442 Ай бұрын
sir its not showing copy option in html
@AdeelAhmad0007
@AdeelAhmad0007 7 ай бұрын
good
@brightasinde7034
@brightasinde7034 Жыл бұрын
Sir Please am looking for how to creat contact form email, text using nave element instead of div element ?
@Chilli_Tea
@Chilli_Tea 8 ай бұрын
extra challenge: style nav with flexbox
@nazmoonnahar9996
@nazmoonnahar9996 8 ай бұрын
Bro really cooked
@KaranSingh-zz9rg
@KaranSingh-zz9rg 5 ай бұрын
thanks sir
@withinsyn7482
@withinsyn7482 3 ай бұрын
Thank you!!!!!!
@kingsleydied
@kingsleydied 2 ай бұрын
does anyone elses nav bar stop working when they put it in a ordered list? I don't know how to get it to work
@ethioictmedia
@ethioictmedia 11 ай бұрын
it is Good
@oussamaidrissi9536
@oussamaidrissi9536 6 ай бұрын
Thanks you
@Compilationguy1727
@Compilationguy1727 2 ай бұрын
The second a copy the html page the codes stoped working
@why_milinnd_01
@why_milinnd_01 3 ай бұрын
Why dont you just use display flex ??
@semiloreolowe2962
@semiloreolowe2962 4 ай бұрын
Please what extension do you use
@lutfirighthere
@lutfirighthere 7 күн бұрын
Do you mean coding software? He uses visual Studio
@chamnabkem5459
@chamnabkem5459 Жыл бұрын
Thank you!!!
@EnderKyo
@EnderKyo Жыл бұрын
My styled nav bar isn’t showing up on my second page the links are there it just isn’t styled like the home page, any thoughts?
@EnderKyo
@EnderKyo 10 ай бұрын
@@bqadrat thanks a bunch man I appreciate your comment but I already passed the class so I’m set 😂
@boss-ut6yw
@boss-ut6yw 6 ай бұрын
question what is padding what is margin ?
@Irin_yigir
@Irin_yigir 5 ай бұрын
padding: is the space between the block content and it's border; Margin: is the space between the block itself and the borders of the page;
@boss-ut6yw
@boss-ut6yw 5 ай бұрын
@@Irin_yigir thanks
@RickWoellert
@RickWoellert 2 ай бұрын
Yeah Bro I really learn so much from your Videos. I have another Version instead of the float: left you can change the display to inline-block for the (a) and (li): And i also change the margin and padding so the ul is in the center( no is not in the center when i change the size of the screen where the index.html is opened. How to center the horizontal navigation bar? Maybe with flexbox but the topic comes later. style.css /* No Margin for the Navigation Bar */ body { margin: 0px; } /* The content after the Nav Bar should have a margin */ main { margin-left: 20px; margin-right: 20px; } /* Header of the Website */ h1 { text-align: center; } /* The ul content inside the navbar */ .navbar ul { list-style-type: none; /* Remove the bullet Points in front */ background-color: hsl(0, 0%, 25%); padding: 0px; /* Size inside the ul bar. */ padding-left: 70px; /* to center */ margin: 0px; overflow: hidden; /* Keeps content in the navbar ul */ } .navbar a { color: white; text-decoration: none; /* remove the underline */ padding: 15px; /* Space between each a Element */ display: inline-block; /* Changed from block to inline-block */ text-align: center; } .navbar a:hover { background-color: hsl(0, 0%, 10%); } .navbar li { display: inline-block; /* Changed from float to inline-block */ }
@Pavan-gq3ld
@Pavan-gq3ld 7 ай бұрын
I'm getting hover effect on logo how do i get rid of it help mee please ,🙋‍♀️
@lutfirighthere
@lutfirighthere 7 күн бұрын
what is your code
CSS website layout in 9 minutes! 🗺️
9:28
Bro Code
Рет қаралды 104 М.
Navbar CSS Tutorial: 3 Ways to Create a Navigation Bar with Flexbox
15:08
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
Every team from the Bracket Buster! Who ya got? 😏
0:53
FailArmy Shorts
Рет қаралды 13 МЛН
Create a clean, modern navigation with HTML & CSS
25:17
Kevin Powell
Рет қаралды 157 М.
Learn CSS in 1 hour 🎨
1:00:00
Bro Code
Рет қаралды 1,3 МЛН
How to Create Responsive Navigation Bar using HTML and CSS
8:00
CodingNepal
Рет қаралды 2,9 МЛН
Simple Dropdown Menu Using HTML & CSS - EASY TUTORIAL
9:41
Devression
Рет қаралды 65 М.
How to Properly Layout A Website (For Beginners)
14:50
The Website Architect
Рет қаралды 678 М.
Learn CSS in 20 Minutes
23:44
Web Dev Simplified
Рет қаралды 1,9 МЛН
CSS Tutorial: Creating a Navigation Menu | Web Development Tutorials #23
13:33