YouTip LogoYouTip

Bootstrap Dropdowns

## Bootstrap Dropdowns This chapter focuses on Bootstrap dropdowns. Dropdowns are toggleable, contextual menus for displaying lists of links. They are made interactive with the included (#). To use dropdowns, simply add the dropdown menu within a class **.dropdown**. The following example demonstrates a basic dropdown: ## Example [Try it Β»](#) The result is as follows: ![Image 1: Basic Dropdowns](#) ## Options ### Alignment Add the class **.pull-right** to the **.dropdown-menu** to right-align the dropdown menu. The following example demonstrates this: ## Example [Try it Β»](#) The result is as follows: ![Image 2: Right-aligned Dropdown Menu](#) ### Headers You can use the class **dropdown-header** to add headers to the label area of the dropdown menu. The following example demonstrates this: ## Example [Try it Β»](#) The result is as follows: ![Image 3: Dropdown Menu Headers](#) * * * ## More Examples | Class | Description | Example | | --- | --- | --- | | .dropdown | Specifies the dropdown menu. All dropdown menus are wrapped in .dropdown. | (#) | | .dropdown-menu | Creates the dropdown menu. | (#) | | .dropdown-menu-right | Right-aligns the dropdown menu. | (#) | | .dropdown-header | Adds a header to the dropdown menu. | (#) | | .dropup | Specifies a dropup menu (opens upwards). | (#) | | .disabled | Disables an item in the dropdown menu. | (#) | | .divider | Adds a divider line in the dropdown menu. | (#) |
← Bootstrap Button GroupsBootstrap Glyphicons β†’