Bootstrap Menus
In HTML, a menu is often defined in an unordered list <ul>
(and styled
afterwards), like this:
Tabs are created with <ul class="nav nav-tabs">
:
You can also use tabs in a dropdown menu.
To make the tabs toggleable, add the data-toggle="tab"
attribute to each link.
Then add a .tab-pane
class with a unique ID for every tab and wrap them inside a
<div>
element with class .tab-content
.
You can create pills with <ul class="nav nav-pills">. You can also mark the current page with <li class="active">.
Add the .nav-stacked class to display the pills vertically.
You can also use dropdown menu with pills.
It is same as toggleable dynamic tabs, the only change is the data-toggle attribute to data-toggle="pill" .
Nav menus are navigation menus used in websites. If you want to create a simple horizontal menu in a website, add the .nav class to a <ul> element, followed by .nav-item for each <li> and add the .nav-link class to their links.
Add the .flex-column class to create a vertical nav.
For justified tabs/pills, add the .nav-justified class (equal width):