Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin.
Examples
Wrap the dropdown’s toggle (your button or link) and the dropdown menu within .dropdown
, or another element that declares position:
relative;. Dropdowns can be triggered from < a >
or < button >
elements to better fit your potential needs.
< a >
element:Add .disabled
to items in the dropdown to style them as disabled.
By default, a dropdown menu is automatically positioned 100% from the top and along the left
side of its parent. Add .dropdown-menu-right
to a .dropdown-menu
to right align the dropdown menu.
Similarly, create split button dropdowns with virtually the same markup ap single button
dropdowns, but with the addition of .dropdown-toggle-split
for proper
spacing around the dropdown caret.
Button dropdowns work with buttons of all sizes, including default and split dropdown buttons.
Trigger dropdown menus above elements by adding .dropup
to the parent
element.
Trigger dropdown menus above elements by adding .dropright
to the parent
element.
Trigger dropdown menus above elements by adding .dropleft
to the parent
element.