Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In twitter bootstrap, what is the difference between the navbar and nav pills?

Tags:

I was going through the components of twitter bootstrap and I found that there are two separate sections of navigational components, one is the Navbar and the other is the Nav-pills/tabs etc.

Navbar seems to be very similar to nav-pills, can anyone please highlight the difference between them and when to use either one of them as the the documentation is not really clear about this.

Navbar:

"To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a .container, which sets the width of your site and content"

Navbar

Nav-pills:

Nav-pills

Taken from the bootstrap documentation

like image 303
Soham Avatar asked Dec 24 '12 13:12

Soham


People also ask

What is the difference between NAV and navbar in Bootstrap?

A "navbar" is an area on a page that contains navigation components (links, buttons, etc) for getting to other pages of the website. A "nav" is an HTML element that is normally used to enclose other elements related to navigation.

What are pills in Bootstrap?

Nav-pills is used for menu purpose in Bootstrap 4 to nav tag-based navigation.

What's the difference between tabs and pills?

Tablets have a longer shelf life and come in a variety of forms. They can also accommodate a higher dose of an active ingredient than a capsule. They tend to be slower acting and, in some cases, may disintegrate unevenly in your body. Capsules act quickly and most, if not all, of the drug is absorbed.

What is the use of navbar in Bootstrap?

Navbar navigation links build on our . nav options with their own modifier class and require the use of toggler classes for proper responsive styling. Navigation in navbars will also grow to occupy as much horizontal space as possible to keep your navbar contents securely aligned.


1 Answers

Navbar aims to be common to all pages of your site ("support for a project name" is the link to homepage) whereas nav pills may be a navbar specific to a page or a section.

Basically, navbar is unique and provides links to main parts of your site. Nav pills may provide internal links to your page anchors...

But this is your decision anyway, depending on your preferences for menu rendering.

like image 86
AlterPHP Avatar answered Jan 03 '23 18:01

AlterPHP