Custom Tabs
For our custom Nav Tabs, wrap your content in a .tab-container
container. It is best not to use .card-header
or other .card-*
for this.
General Classic Tab 1
Lorem ipsum dolor sit amet, ut qui commodo sensibus, id utinam inermis constituto vim. In nam dolorum interesset, per fierent ponderum ea. Eos aperiri feugiat democritum ne.
Ei saepe abhorreant temporibus cum, hinc praesent voluptatum ea has. Vis nihil tacimates senserit ut, quo posse labores honestatis te. Ex duo nullam posidonium deterruisset, altera aeterno duo eu.
General Classic Tab 2
Ei mel vocent latine intellegat. Nam ex sumo dolorum ceteros. Mei ne liber intellegam. Ferri quaeque mea in, mel munere rationibus at.
In has homero blandit vituperatoribus, eum latine interpretaris eu, sale commodo has eu.
General Classic Tab 3
Munere consetetur an usu, vis quot maiestatis concludaturque at. Ne etiam indoctum referrentur eum, vix legimus nominati eu. Epicurei quaestio sea ut, munere deserunt adipiscing qui te.
Disputando voluptatibus ei sit. Et veri deserunt theophrastus pri, at mutat choro eum.
Learn MoreGeneral Classic Tab 1
Lorem ipsum dolor sit amet, ut qui commodo sensibus, id utinam inermis constituto vim. In nam dolorum interesset, per fierent ponderum ea. Eos aperiri feugiat democritum ne.
Ei saepe abhorreant temporibus cum, hinc praesent voluptatum ea has. Vis nihil tacimates senserit ut, quo posse labores honestatis te. Ex duo nullam posidonium deterruisset, altera aeterno duo eu.
General Classic Tab 2
Ei mel vocent latine intellegat. Nam ex sumo dolorum ceteros. Mei ne liber intellegam. Ferri quaeque mea in, mel munere rationibus at.
In has homero blandit vituperatoribus, eum latine interpretaris eu, sale commodo has eu.
General Classic Tab 3
Munere consetetur an usu, vis quot maiestatis concludaturque at. Ne etiam indoctum referrentur eum, vix legimus nominati eu. Epicurei quaestio sea ut, munere deserunt adipiscing qui te.
Disputando voluptatibus ei sit. Et veri deserunt theophrastus pri, at mutat choro eum.
Learn MoreVertical align left with .tab-container-left
General Classic Tab 1
Lorem ipsum dolor sit amet, ut qui commodo sensibus, id utinam inermis constituto vim. In nam dolorum interesset, per fierent ponderum ea. Eos aperiri feugiat democritum ne.
Ei saepe abhorreant temporibus cum, hinc praesent voluptatum ea has. Vis nihil tacimates senserit ut, quo posse labores honestatis te. Ex duo nullam posidonium deterruisset, altera aeterno duo eu.
General Classic Tab 2
Ei mel vocent latine intellegat. Nam ex sumo dolorum ceteros. Mei ne liber intellegam. Ferri quaeque mea in, mel munere rationibus at.
In has homero blandit vituperatoribus, eum latine interpretaris eu, sale commodo has eu.
General Classic Tab 3
Munere consetetur an usu, vis quot maiestatis concludaturque at. Ne etiam indoctum referrentur eum, vix legimus nominati eu. Epicurei quaestio sea ut, munere deserunt adipiscing qui te.
Disputando voluptatibus ei sit. Et veri deserunt theophrastus pri, at mutat choro eum.
Learn MoreVertical align right with .tab-container-right
General Classic Tab 1
Lorem ipsum dolor sit amet, ut qui commodo sensibus, id utinam inermis constituto vim. In nam dolorum interesset, per fierent ponderum ea. Eos aperiri feugiat democritum ne.
Ei saepe abhorreant temporibus cum, hinc praesent voluptatum ea has. Vis nihil tacimates senserit ut, quo posse labores honestatis te. Ex duo nullam posidonium deterruisset, altera aeterno duo eu.
General Classic Tab 2
Ei mel vocent latine intellegat. Nam ex sumo dolorum ceteros. Mei ne liber intellegam. Ferri quaeque mea in, mel munere rationibus at.
In has homero blandit vituperatoribus, eum latine interpretaris eu, sale commodo has eu.
General Classic Tab 3
Munere consetetur an usu, vis quot maiestatis concludaturque at. Ne etiam indoctum referrentur eum, vix legimus nominati eu. Epicurei quaestio sea ut, munere deserunt adipiscing qui te.
Disputando voluptatibus ei sit. Et veri deserunt theophrastus pri, at mutat choro eum.
Learn MoreBase nav
The base .nav
component is built with flexbox and provide a strong foundation for building all types of navigation components. It includes some style overrides (for working with lists), some link padding for larger hit areas, and basic disabled styling.
Navigation available in Bootstrap share general markup and styles, from the base .nav class to the active and disabled states. Swap modifier classes to switch between each style.
Use <ul>
s or <ol>
to order your items or use your own with a <nav>
element. Because the .nav
uses display: flex
, the nav links behave the same as nav items would but without the extra markup.
Horizontal alignment
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
Centered with .justify-content-end
Vertical alignment
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
).
Navigation available in Bootstrap share general markup and styles, from the base .nav class to the active and disabled states.
Again, because the .nav
uses display: flex
, the nav links behave the same as nav items would but without the extra markup.
Tabs
Adds the .nav-tabs
class to generate a tabbed interface.
Take that same HTML but use .nav-pills
instead:
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-item
's, 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.
Similar to the .nav-fill
example using a <nav>
-based navigation.
Working with flex utilities
If you need responsive nav variations, consider using a series of flexbox utilities. While more verbose, these utilities offer greater customization across responsive breakpoints. In the example below, our nav will be stacked on the lowest breakpoint, then adapt to a horizontal layout that fills the available width starting from the small breakpoint.
Note that navigation bars, even if visually styled as tabs with the .nav-tabs
class, should not be given role="tablist"
, role="tab"
or role="tabpanel"
attributes. These are only appropriate for dynamic tabbed interfaces, as described in the WAI ARIA Authoring Practices. The aria-current
attribute is not necessary on dynamic tabbed interfaces since Bootstrap's JavaScript handles the selected state by adding aria-selected="true"
on the active tab.