Classes are used, allowing <ul>, <ol> and <nav> elements to be used.
Styles
Line
Use .nav-line with a .nav element to create a navigation element with underlines.
Tabs
Use .nav-tabs with a .nav element to create a tabbed interface. This is the default style used by the Tabs extension.
Pills
Use .nav-pills with a .nav element to create a pill-style navigation element. Use border radius utilities to control the rounding of the pills.
Alignment
Horizontal alignment
Change the horizontal alignment of your nav with flexbox utilities.
Use .justify-content-center to position items in the center of the .nav element.
Use .justify-content-end to position items at the end of the .nav element.
Fill and justify
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, be sure to include .nav-item on the anchors.
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.
As before, when using a <nav>-based navigation, be sure to include .nav-item on the anchors.
Vertical alignment
Use .flex-column to create a vertical nav.
Use responsive variants like .sm:flex-column to target specific screen sizes.
Questions or feedback about this article? Let us know
Verify purchase
Provide details about your purchase to unlock this and other code examples throughout the website.