Navs and tabs

Documentation and examples for how to use Bootstrap’s included navigation components.

Basic

              
  
              
            

Styles

Horizontal

Change the horizontal alignment of your nav with flexbox utilities. By default, navs are left-aligned, but you can easily change them to center or right aligned.

Centered with .justify-content-center:

              
  
              
            

Right-aligned with .justify-content-end:

              
  
              
            

Vertical

Stack your navigation by changing the flex item direction with the .flex-column utility. Need to stack them on some viewports but not others? Use the responsive versions (e.g., .flex-sm-column).

              
  
              
            

As always, vertical navigation is possible without <ul>s, too.

              
  
              
            

Tabs

              
  
              
            

Pills

              
  
              
            

Fill and justify

Force your .nav’s contents to extend the full available width one of two modifier classes. To proportionately fill all available space with your .nav-items, use .nav-fill. Notice that all horizontal space is occupied, but not every nav item has the same width.

              
  
              
            

When using a <nav>-based navigation, you can safely omit .nav-item as only .nav-link is required for styling <a> elements.

              
  
              
            

For equal-width elements, use .nav-justified. All horizontal space will be occupied by nav links, but unlike the .nav-fill above, every nav item will be the same width.

              
  
              
            

With dropdowns

Tabs with dropdowns

Pills with dropdowns