Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

bootstrap
navigation
nav
communitycreator

What are Bootstrap 4 navs?

Ahmad Youasf

Overview

Navigation is used in Bootstrap to share general markup and styles by using base class base.nav. The base components in navigation are built with flexbox which helps to make multiple types of navigation components.

Syntax

The syntax is shown below:

<nav class=” ”>
   <a class=” ”href=” “></a>
</nav>

Nav menu

  • Aligned nav: Nav can be aligned by using justify-content class either horizontally or vertically.
  • Base nav: It provides a strong foundation for all types of navigation components and its component does not have an active state.
  • Tabs: It create tabs in the navigation bar by using the .nav-tab class.
  • Pills: Navs can be turned into pills by using the .nav-pills class.

Code

All navs have different nav-items. In code, different types of navs are used like:

  • Base nav
  • Aligned nav(Horizontal/vertical)
  • Tabs
  • Pills

Code

Let’s look at the code below:

  • HTML

Explanation

In the above code, we create html file and add 4 navs in it.

RELATED TAGS

bootstrap
navigation
nav
communitycreator
RELATED COURSES

View all Courses

Keep Exploring