Bootstrap 3 Tutorial
Most web pages include some sort of menu.
In HTML, a menu is commonly defined in an unordered list <ul> (and then stylized), like this:
To build a horizontal menu from the list above, add the .list-inline class to <ul>.
Alternatively, you may display the menu above using Bootstrap’s Tabs and Pills (see below).
Note: See the final example on this page to learn how to make tabs and pills toggleable/dynamic.
Tabs can also contain dropdown menus.
The following example creates a dropdown menu for “Menu 1”:
In the following example, the vertical pill menu is placed inside the last column. So, on a large screen, the menu will be displayed on the right. However, on a small screen, the material will automatically convert to a single-column layout:
Pills can also contain dropdown menus.
The following example creates a dropdown menu for “Menu 1”:
To make the tabs toggleable, add the data-toggle=”tab” property to all links. Then, add a .tab-pane class with a unique ID for each tab and surround it inside a <div> element with class .tab-content.
To make the tabs fade in and out when clicked, add the .fade class to .tab-pane.
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.