Navigation bar - CSS vs Bootstrap

Hi,

I was trying to learn how to build a navigation bar and noticed two main approaches:
1 - Bootstrap Navigation Bar.
Here is a link: https://www.w3schools.com/bootstrap/bootstrap_navbar.asp

2 - CSS
Here is a link: https://www.w3schools.com/css/css_navbar.asp

Which approach considered better?
Any pros / cons to each one?

Thanks.

Hi!
In my opinion, main difference between them is the logic. W3C says that tag is for a main set of links, and if you need menu(which is equal to a list of links and you can have it a lot of even in one page), than it is better to use ul>li structure. But as for me I didn’t see any major differences in realisation and in validation both of them and I will be very grateful if you will tell me about them if you will find them

1 Like

They are the same thing.

Bootstrap just conveniently did all the styling for you in a class, which is nice, but when you get down to quirkier specifications like wanting special animations, or you want you nav link in parallelograms instead of rectangles. The customizations add up and eventually it can be as tedious as rolling your own CSS.

For the sake of ease, if you just want a nice looking navbar, bootstrap is excellent. If you want to learn exactly how the styling works like how the element laid out, how it responds to change in screen size, why does the toggle work the way it does. You should maybe implement one on your own. It is not the most complicated thing in the world and a good way to test if you can apply the CSS you’ve learned

3 Likes

Find bootstrap navigation bar